mysql - PHP - inserting values error: Check SQL version -
i have tried insert few values database doesn't work. show error.
you have error in sql syntax; check manual corresponds mysql server version right syntax use near '','pranavkumar.chess@gmail.com')' @ line 1
i need it. so, can please.
the portion php code is:
$reason= $_get['reason']; $option= $_get['option']; $for= $_get['category']; $approved= $_get['approved']; $before= $_get['before']; $username= $_session ["username"]; $myquery="insert request (`serial number`, `request date`, `request category`, `request`, `reason`, `approved by`, `username`) values ('',now(),'$for','$option','$reason',$approved','$username')"; $query = mysql_query($myquery); if ( ! $query ) { echo mysql_error(); die; }
single quote missing @ '$approved'
$myquery="insert request (`serial number`, `request date`, `request category`, `request`, `reason`, `approved by`, `username`) values ('',now(),'$for','$option','$reason','$approved','$username')";
Comments
Post a Comment