$sql="delete fron".$table."where".$where;
2016-12-03
修改
foreach($arr as $key=>$values){
$keyValues[]= $key."=".$values;
}
$keyAndvalues=implode(","$keyValues);
$sql="update".$table."set".$keyAndvalues."where".$where;
foreach($arr as $key=>$values){
$keyValues[]= $key."=".$values;
}
$keyAndvalues=implode(","$keyValues);
$sql="update".$table."set".$keyAndvalues."where".$where;
2016-12-03
$key=implode(","."`".array_keys($arr)."`");
$values=implode(","."`".array_values($arr)."`")
$sql="insert into ".$table."(".$keys.")values($values)";
$values=implode(","."`".array_values($arr)."`")
$sql="insert into ".$table."(".$keys.")values($values)";
2016-12-03