• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql select exception

 
srinus reddyy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
select BAR_fname,BAR_lname,BAR_empid,BAR_userid,BAR_date_of_regn
from boomerang_alumni_registration where BAR_status="current";

i am getting the below exception while executing the query
please let me know what's wrong with the query


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"curr' at line 2
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use single quotes around strings in SQL, not double quotes
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And a reminder use two single quotes (not the double quotes character) to include an actual single quote within the text of the query. Such as: SELECT * FROM widgets WHERE name = 'O''brian'
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic