What is wrong with this PHP MySQL Query? -


i keep getting mysql error when using query:

$query = "insert subscribe (`firstname`,`lastname`,`username`,`password`,`email`,`expiration`,`status`,`policy`,`dlpolicy`,`extension`,`key`,`temp`) values ('".mysql_real_escape_string($fname)."','".mysql_real_escape_string($lname)."','".mysql_real_escape_string($user)."', '".mysql_real_escape_string($pass)."', '".mysql_real_escape_string($email)."','".$exp."', '".$userkey."', '3', '1', '.exe,.mp3,.torrent,.mov,.zip','0', '0'"; 

here error:

you have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 1 

any ideas?

looks forgot closing ) values.

this should work:

$query = "insert subscribe (`firstname`,`lastname`,`username`,`password`,`email`,`expiration`,`status`,`policy`,`dlpolicy`,`extension`,`key`,`temp`) values ('".mysql_real_escape_string($fname)."','".mysql_real_escape_string($lname)."','".mysql_real_escape_string($user)."', '".mysql_real_escape_string($pass)."', '".mysql_real_escape_string($email)."','".$exp."', '".$userkey."', '3', '1', '.exe,.mp3,.torrent,.mov,.zip','0', '0')"; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -