Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

SQL syntax error

syntax syntax error

  • Please log in to reply
2 replies to this topic

#1 reachpradeep

reachpradeep

    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 04 March 2007 - 06:51 AM

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,
  • 0

#2 Patrick

Patrick

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 101 posts

Posted 10 October 2007 - 10:33 AM

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.
  • 0

#3 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 11 October 2007 - 08:29 AM

You have a comma after ml_link_id.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: syntax, syntax error

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download