Jump to content

SQL syntax error

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
reachpradeep

reachpradeep

    Learning Programmer

  • Members
  • PipPipPip
  • 41 posts
hello,

i'm getting the following error and i just can't see the mistake in my code...

the 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 ') VALUES('caleyc@email.com', 'Caley', 'Crossman', 'English', 'on', 'on', 'cons' at line 2

my php code:

// Insert a row of information into the table "mailing_list"

mysql_query("INSERT INTO mailing_list 

(ml_email, ml_first_name, ml_last_name, ml_language, ml_mailing_list_status, ml_rsvp, ml_link_id,) VALUES('$email_refresh', '$first_name_refresh', '$last_name_refresh',

 '$language_refresh', '$mailing_list_status', '$rsvp_refresh', '$link_id_refresh') ") 

or die(mysql_error());  

Where's my mistake?

thanks a lot,

#2
Patrick

Patrick

    Programmer

  • Members
  • PipPipPipPip
  • 101 posts
I have sent this thread to one of my friend who is doing MSc in Computer Science in US. He will definitely send some help and I will post it here in 24 hours.

Don't worry you'll be fine soon.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You have a comma after ml_link_id.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog