插入管理員記錄提示錯誤,求解答,感激不盡
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
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
2015-02-28
舉報
2015-03-04
insert table_name(字段名稱,...) value('值',...);
insert 和表名之間有空格
^-^...
2015-02-28
'insertbuy_admin(username,password,email)values('','','')' at line 1
我插入的語法是這樣的
function insert($table,$array){
?$keys=join(",",array_keys($array));
?$vals="'".join("','",array_values($array))."'";
?$sql="insert{$table}($keys)values({$vals})";
?mysql_query($sql)
?or die(mysql_error());
?return mysql_insert_id();
}
2015-02-28
near后面呢?