执行非查询SQL语句

 


 

execute

 

public function execute($sql, $params = null)

 

$sql = 'DELETE FROM sns_topic_channel WHERE channel_id = 100';
$this->execute($sql);

$sql = 'DELETE FROM __TABLE__ WHERE channel_id = 100';
$this->execute($sql);

sql = 'DELETE FROM __TABLE__ WHERE type = ? AND status = ?';
$params = array(2, -1);
$this->execute($sql, $params);