Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database

 
yugandhar channagiri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am retriving the values from text boxes s1,s2,s3
using this i want write a query
"SELECT * FROM regis where Username like '%"+s1+"%' and Lastname like '%"+s2+"%' and sex like '%"+s3+"%' "
but here good thing is it is executing
and bad thing is it is not displaying the result
in java
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) print the statement before executing it
2) run the query in a database client
3) fix the query until it works in the client
4) convert back to your application.

(don't try to debug sql in your code)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic