帮忙看下这样有什么问题,一直连不上
function insert($table,$array){
$keys=join(",",array_keys($array));
$vals="'".join("','",array_values($array))."'";
$sql="insert into {$table}($keys) values({$vals})";
mysqli_query($link,$sql);
return mysqli_insert_id($link);
}
function insert($table,$array){
$keys=join(",",array_keys($array));
$vals="'".join("','",array_values($array))."'";
$sql="insert into {$table}($keys) values({$vals})";
mysqli_query($link,$sql);
return mysqli_insert_id($link);
}
2019-12-09
举报