Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unanswered: 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

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •