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

MySQLSyntaxError (but looks fine to me!!??)

 
Joe Lemmer
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I am getting a MySQLSyntaxError at Runtime that says:

check the manual that corresponds to your MySQL server version for the right syntax to use near ' ='A' OR listLetter = 'B' ' at line 1


Well I've checked and I can't understand whats wrong. When I manually query the database from the mySQL command prompt it works no probs. Can anyone see what I'm doing wrong?

Here is some partial code from my JDBC method:



Thanks for any help :-)

Regards

Joe
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is this valid?
 
Joe Lemmer
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aaaah! I see!

I have now put a space in front of the word WHERE and it works.

Thanks Bauke, you're a star :-)
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic