java - Checking value in database in two columns -


i have mysql table columns id , name. want take value in variable id , name. how check value in 2 columns?

i have tried this:

select count(*) topic (name= '"+ name + "' or id='"+name+"') 

the variable name same, have check in 2 columns.

you may want use like instead of =


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -