Jump to content

insert query trouble


supermerc

Recommended Posts

Hey this is a simple insert query but im getting an error and I just cant see why, if anyone sees something wrong with it could you please tell me?

 

$sql = "INSERT INTO bonusaps(name, by, reason, aps, date) VALUES ('{$_SESSION[s_username]}', 'self', 'Potion Set', '30', '{$today}')";

 

getting the error

 

MySQL Error:

INSERT INTO bonusaps(name, by, reason, aps, date) VALUES ('ServeD', 'self', 'Potion Set', '30', 'February 25, 2009, 12:53 pm')

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 'by, reason, aps, date) VALUES ('ServeD', 'self', 'Potion Set', '30', 'February 2' at line 1

Link to comment
https://forums.phpfreaks.com/topic/146921-insert-query-trouble/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.