<?php
/**
* updateWhere 处理关联表,更安全,但是效率相对较低
*/
Project::meta()->updateWhere(array('click'=>9),'[pid] =?',2);
/**
* updateDbWhere 第二个参数为sql条件字符窜,或者条件数组,不支持动态参数模式
*/
Project::meta()->updateDbWhere(array('click'=>8),array('pid'=>'abc'));
/**
* destory 会检查实例化所有的对象 处理好表关联等后销毁
*/
Project::meta()->destroyWhere('[pid] =? and [click] = ?','abc',20);
/**
* detele 也不支持动态参数模式
*/
Project::meta()->deleteWhere(array('pid'=>'abc'));
转载于:https://www.cnblogs.com/guarda/p/6638409.html