//新增字段
private function create_field($tbl,$field)
{
$sql = "alter table {$tbl} add {$field}";
dd($sql,'',1);
$res = M()->execute($sql);
dd($res,'');
}
private function update_sql($tbl,$update)
{
$sql = "update {$tbl} set {$update}";
dd($sql,'',1);
//$res = M()->query($sql);
//dd($res,'');
}
//删除索引
private function drop_index($tbl,$index)
{
$sql ="alter table {$tbl} drop index {$index}" ;
dd($sql,'');
$res = M()->execute($sql);
dd($res,'');
}
//增加索引
private function create_index($tbl,$field)
{
$sql ="alter table {$tbl} add index index_time ($field)";
dd($sql,'');
$res = M()->execute($sql);
dd($res,'');
}