Register    Login    Forum    Search    FAQ

Board index » Programming » SQL & Databases




 Page 1 of 1 [ 3 posts ] 



Author Message
 Post subject: Please, I need help with this error message.
 Post Posted: Thu Jan 31, 2013 6:39 am 
Offline
Novice User
Novice User

Joined: Sun Jan 20, 2013 8:03 pm
Posts: 24
Languages: java, c, c++, php,html,
Text editor: notepad++,komodo,dev-c++
whenver I execute this;
"SELECT username FROM 'customers' WHERE 'username' = '$username' "

I get this error:
#1064 - 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 '"SELECT username FROM 'customers' WHERE 'username' = '$username' "' at line 1


Please help.
[Code=sql][/Code]


Top 
 Post subject: Re: Please, I need help with this error message.
 Post Posted: Thu Jan 31, 2013 9:48 am 
Offline
Pro Member
Pro Member

Joined: Thu Feb 23, 2012 8:08 pm
Posts: 42
Location: Delaware USA
Languages: PHP, HTML, CSS, Visual Basic and Mid 80s Basic, Occasional Profanity
Text editor: Notepad++
Try this...
SELECT username FROM customers WHERE username = '$username'

I'm pretty sure the quotes on the left side of equal sign are the problem.

_________________
Thanks! OR Hope This Helps
Doug
DJS Web Design


Top 
 Post subject: Re: Please, I need help with this error message.
 Post Posted: Thu Jan 31, 2013 3:04 pm 
Offline
Novice User
Novice User

Joined: Sun Jan 20, 2013 8:03 pm
Posts: 24
Languages: java, c, c++, php,html,
Text editor: notepad++,komodo,dev-c++
Thanks!! It worked.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 3 posts ] 




Board index » Programming » SQL & Databases


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron