为何我的insert方法返回值一直是0呢
/**
* 插入操作
* @param unknown $table
* @param unknown $array
*/
function insert($table,$array){
$array['password'] = md5($array['password'] );
$keys = join(",",array_keys($array));
$vals = "'".join("','",array_values($array))."'";
$sql = "insert {$table}($keys) values({$vals})";
mysqli_query(connect(),$sql);
return mysqli_insert_id(connect());
}