Forum Moderators: coopster
any ideas
You can either rename the field or always enclose it in backticks(`) in your queries.
Example:
INSERT INTO admin (menu_id, name, link, `desc`, date_entered)
Could not add the entry because: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '', date_entered) VALUES (0, 'adasd', 'asdasdasdas','dasdas', NO. The query was INSERT INTO admin (menu_id, name, link, description', date_entered) VALUES (0, 'adasd', 'asdasdasdas','dasdas', NOW()).
$query = "INSERT INTO admin (menu_id, name, link, description', date_entered) VALUES (0, '{$_POST['name']}', '{$_POST['link']}','{$_POST['descr']}', NOW())";
and mysql is
Field Type Attributes Null Default Extra Action
sub_id int(10) UNSIGNED No auto_increment
name text No
link text No
date_entered timestamp(14) Yes NULL
description text No
Check All / Uncheck All With selected: