PHP mySQL INSERT syntax error? -


i'm newbie , i've been trying on hour solve simple query:

mysql_query("insert `tracks` (artistid, albumid, format, trackid, nicetitle, title, tracknumber, description, pictureurl, playcount) values('$artistid', '$albumid[$i]', 'hq','$id[0]', '$trackname', '$title', '$j', '$description', '$pictureurl', '$playcount'") or die(mysql_error()); 

i error every time:

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

i've done mysql_escape_string() on variables too. ideas?

you missing final closing ):

mysql_query("insert `tracks` (artistid, albumid, format, trackid, nicetitle, title, tracknumber, description, pictureurl, playcount) values('$artistid', '$albumid[$i]', 'hq','$id[0]', '$trackname', '$title', '$j', '$description', '$pictureurl', '$playcount')") or die(mysql_error()); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -