//分表的伪ID; $id = $_POST['id']; //对主键id取模从而来判断操作哪张分表 $d = $id%2; $sql = update user{$d} set username='{$username}',age='{$age}' where id = $id; $model->query($sql);
Done!
//分表的伪ID; $id = $_POST['id']; //对主键id取模从而来判断操作哪张分表 $d = $id%2; $sql = update user{$d} set username='{$username}',age='{$age}' where id = $id; $model->query($sql);
Done!