我想在表格中使用1个字段进行数据定位,并且必须自动递增
public function DBInsert($table_name, $form_data){
// retrieve the keys of the array (column titles)
$fields = array_keys($form_data);// build the query
$sql = "INSERT INTO ".$table_name.".(`".implode('`,`', $fields)."`)VALUES('".implode("','", $form_data)."')";
//echo $sql;// run and return the query result resource return
mysql_query($sql) or die(mysql_error());
}