我是一个PHP和MySQL新手,当其中一个数据库字段是唯一的时,mysql_insert_id()的行为就变成了砖墙。大大简化了,我有两张桌子。$sql = "INSERT IGNORE INTO user ( email ) VALUES ( '$email' )";
//INSERT to a UNIQUE email causes anWith IGNORE, no INSERT happens (affected_row
我可以在PHPMyAdmin中运行以下查询,但由于某些原因,我在PHP中的mysql方法中运行它时出现语法错误:INSERT INTO product_description (product_id, language_id, name, Description)
VALUES(@lastid, 1,: You have an error in your SQL syntax; check the manual that correspon