查询构造器插入更新删除

$db = DB:table("users");
$db->insert(数组字段对值);
$db->insertGetId(数组) ;//这个会返回插入后的id值
$db->where()->update(数组字段对值);
$db->where()->increment(字段,增加的值);
$db->where()->decrement(字段,减少的值);
$db->where()->delete();
$db->truncate(); //删除所有重置id

首页 我的博客
粤ICP备17103704号