php - 1064 syntax error in mysql -


i confused. don't know error. on execution got message:

" have error in sql syntax; check manual corresponds mysql server version right syntax use near 'group(creator,type,name,details,icon)values (6,'information sharing','test','j' @ line 1"

my query :

insert group      (creator, type, name, details, icon) values     (6, 'information sharing', 'test', 'just testing',     'my friend/group_uploads/pic00_6_0d46839f6371fb84f6b6c682f5fc2c77.jpeg')  

this table specification:

type      varchar(1000) name      varchar(1000) details   varchar(1000) creator   bigint(20) icon      varchar(1000) 

please me correct error .

group reserved word in mysql. need surround in backticks.

like this..

insert `group`(creator, type, name, details, icon) values ('6','information sharing','test','just testing','my friend/group_uploads/pic00_6_0d46839f6371fb84f6b6c682f5fc2c77.jpeg')             ^     ^ 

try avoid having such names columns , tables.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -