Error my mysql query though it seems perfectly fine -
i have query
mysql_query("insert reviews values(0,$pid,$id,'new')") or die(mysql_error()); it seems give error
"you have error in sql syntax; check manual corresponds mysql server version right syntax use near ''new')' @ line 1"
though seems fine, database table structure is:
`id` int(11) not null auto_increment, `proposalid` int(11) not null, `reviewerid` int(11) not null, `status` enum('approved','declined','noresponse','new') not null default 'new', primary key (`id`); there seems nothing wrong, why error?
since default value of enum status set 'new', can try insert such :
mysql_query("insert reviews (`proposalid`, `reviewrid`) values($pid, $id);") or die(mysql_error()); maybe error more talking after this.
Comments
Post a Comment