syntax error

Thread Solved

Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

syntax error

 
0
  #1
Mar 5th, 2009
i have this line of code which i cannot see a problem with but i keep getting an error.

  1. $sql= "INSERT INTO emails (Firstname, Lastname, email, table) VALUES ('$a', '$b', '$c', '$table')";

the error i keep getting is


  1. Error: You have an error in your SQL syntax near 'table) VALUES ('kevin', 'wood', 'kevin_wood@xxxxxxxx', 'news')' at line 1

the values are being passed to this page fine but it still gives me this error.

any help would be much appreciated.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,749
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: syntax error

 
1
  #2
Mar 5th, 2009
table = mysql reserve keyword.

Use `table` instead.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: syntax error

 
0
  #3
Mar 5th, 2009
thanks for the reply nav33n i have been looking for missing semo colons. which is usually my problem. hope u all good ne way not been on here for a while. must say something about the help you gave me in the past.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,749
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: syntax error

 
0
  #4
Mar 5th, 2009
We all learn from our mistakes! Don't we ? I am good. Thanks! I hope you are doing great too. Cheers man!
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: syntax error

 
0
  #5
Mar 5th, 2009
well i still got my job so i cannot be doing that bad. thanks again take it easy and have fun.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,749
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: syntax error

 
0
  #6
Mar 5th, 2009
Cool ! You too..
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC