本文整理汇总了PHP中DBAdapter::executeNoresSQL方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAdapter::executeNoresSQL方法的具体用法?PHP DBAdapter::executeNoresSQL怎么用?PHP DBAdapter::executeNoresSQL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBAdapter
的用法示例。
在下文中一共展示了DBAdapter::executeNoresSQL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drop
public function drop()
{
$prim = self::$_primaryField;
$preparedId = $this->_prepareValue(self::$_metadata[$prim], $this->_id);
$sql = "DELETE FROM `{$this->_table}` WHERE `{$prim}` = {$preparedId} ";
$res = $this->_db->executeNoresSQL($sql);
if (!$res) {
throw new ModelException("Invalid query - " . $this->_db->getError());
}
$this->_data = array();
$this->_id = null;
}
示例2: pushMsg
public function pushMsg($desc, $detail, $type = MSG_SYSINFO)
{
$o_db = new DBAdapter(array('host' => $this->dbConf->crawler->host, 'username' => $this->dbConf->crawler->username, 'password' => $this->dbConf->crawler->password, 'schema' => $this->dbConf->crawler->schema, 'host' => $this->dbConf->crawler->host));
$sql = "INSERT INTO " . $this->dbConf->crawler->schema . ".messages (m_description,m_detail) VALUES (";
$sql .= "'" . $type . addslashes($desc) . "','" . addslashes($detail) . "')";
//executeNoresSQL($query)
$done = false;
if (!$o_db->executeNoresSQL($sql)) {
unset($o_db);
} else {
unset($o_db);
$done = true;
}
return $done;
}