Jump to content

SQL Syntax Error


dapcigar

Recommended Posts

Am trying to save into the DB. after running the query, i keep getting this 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 'leave, meal, gross, tax, pension, dha, hmo, loan, surcharge, corporative, sa, ov' at line 1"

 

have tried looking for the problem but i can't find it.. here's the code below

	$que = mysql_query("INSERT INTO salary(id, firstname, lastname, basic, housing, transport, ultility, entertainment, leave, meal, gross, tax, pension, dha, hmo, loan, surcharge, corporative, sa, overtime, netpay, date, status) 
VALUES (NULL, '$firstname', '$lastname', ' $basic', '$housing', '$transport', '$ultility', '$entertainment', '$leave', '$meal', '$gross', '$tax', '$pension', '$dha', '$hmo', '$loan', '$surcharge', '$corporative', '$sa', '$overtime', '$netpay', '$date', '$status')") or die(mysql_error());	
		

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/292143-sql-syntax-error/
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.