0

i have this line of code which i cannot see a problem with but i keep getting an error.

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

the error i keep getting is

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.

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by nav33n
1

table = mysql reserve keyword.

Use `table` instead.

Votes + Comments
always very helpfull and gives good answers
0

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.

0

We all learn from our mistakes! Don't we ? :) I am good. Thanks! I hope you are doing great too. Cheers man!

0

well i still got my job so i cannot be doing that bad. thanks again take it easy and have fun.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.