If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > SQL syntax Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-06-03, 03:47
myadco myadco is offline
Registered User
 
Join Date: Dec 2003
Posts: 1
SQL syntax Error

I'm trying to build a chat script and I continue to get this error. Any ideas?

Software error:
INSERT INTO chat_message SET from='test123',to='test123',time=1070697785,ip=199 .182.38.11,messages='hllox',room=''

SQL Error: 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 'from='test123',to='test123',time=1070697785,ip=19 9.182.38.11,me
Reply With Quote
  #2 (permalink)  
Old 12-06-03, 04:46
Mincer Mincer is offline
Registered User
 
Join Date: Sep 2003
Location: London
Posts: 56
'from' is a reserved keyword, if you use it as a column name (which is not advisable) you'll have to enclose it in backticks.

Matt.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On