超级计算机囧囧囧's Archivers

From admin on 2012-01-22 10:51:23

Yii-数据库操作(删)

例子:
$post=Post::model()->findByPk(10); // assuming there is a post whose ID is 10
$post->delete(); // delete the row from the database table
// delete the rows matching the specified condition
Post::model()->deleteAll($condition,$params);
// delete the rows matching the specified condition and primary key(s)
Post::model()->deleteByPk($pk,$condition,$params);
COMPARE

查看完整版本: Yii-数据库操作(删)

Tags:


©超级计算机囧囧囧