php - My own SQL syntax error -


my code is.

$newmodel = "insert models (id," .      " firstname," .     " lastname," .     " email," .     " password," .     " group," .     " phone," .     " timeofday," .     " dayofweek," .     " address," .     " city," .     " state," .     " zip," .     " gender," .     " hair," .     " eye," .     " birthday," .     " birthmonth," .     " birthyear," .     " bustshirt," .     " cup," .     " waist," .     " hips," .     " waist," .     " hips," .     " weight," .     " inches," .     " dressjacket," .     " workxp," .     " twitter," .     " facebook," .     " joindate," .     " instagram," .     " imdb," .     " parentid," .     " error) values (".     prepsql($modelid) . ", " .     prepsql($firstname) . ", " .     prepsql($lastname) . ", " .     prepsql($email) . ", " .     prepsql($password) . ", " .     prepsql($group) . ", " .     prepsql($phone) . ", " .     prepsql($timeofday) . ", " .     prepsql($dayofweek) . ", " .     prepsql($address) . ", " .     prepsql($city) . ", " .     prepsql($state) . ", " .     prepsql($zip) . ", " .     prepsql($gender) . ", " .     prepsql($hair) . ", " .     prepsql($eyes) . ", " .     prepsql($bday) . ", " .     prepsql($bmonth) . ", " .     prepsql($byear) . ", " .     prepsql($bust) . ", " .     prepsql($cup) . ", " .     prepsql($waist) . ", " .     prepsql($hips) . ", " .     prepsql($weight) . ", " .     prepsql($height) . ", " .     prepsql($dressjacket) . ", " .     prepsql($workxp) . ", " .     prepsql($twitter) . ", " .     prepsql($facebook) . ", " .     prepsql($joindate) . ", " .     prepsql($instagram) . ", " .     prepsql($imdb) . ", " .     prepsql($parentid) . ", " .     prepsql($error) . ")";  mysql_query($newmodel) or die(mysql_error()); 

its shooting out error:

you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'group, phone, timeofday, dayofweek, address, city, state, zip, gender, hair, eye' @ line 1

group reserved word in mysql. must wrap in backticks:

`group`, phone 

etc.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -