本文整理汇总了PHP中MDB2::quote方法的典型用法代码示例。如果您正苦于以下问题:PHP MDB2::quote方法的具体用法?PHP MDB2::quote怎么用?PHP MDB2::quote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MDB2
的用法示例。
在下文中一共展示了MDB2::quote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _cleanUser
protected function _cleanUser($user)
{
$r = $this->_db->exec('DELETE FROM syncml_data WHERE syncml_uid = ' . $this->_db->quote($user, 'text'));
$this->_checkForError($r);
$r = $this->_db->exec('DELETE FROM syncml_map WHERE syncml_uid = ' . $this->_db->quote($user, 'text'));
$this->_checkForError($r);
$r = $this->_db->exec('DELETE FROM syncml_anchors WHERE syncml_uid = ' . $this->_db->quote($user, 'text'));
$this->_checkForError($r);
$r = $this->_db->exec('DELETE FROM syncml_uids WHERE syncml_uid = ' . $this->_db->quote($user, 'text'));
$this->_checkForError($r);
$r = $this->_db->exec('DELETE FROM syncml_suidlist WHERE syncml_uid = ' . $this->_db->quote($user, 'text'));
$this->_checkForError($r);
}
示例2: msg
/**
* (non-PHPdoc)
* @see debugObject::msg()
* @throws exceptions
*/
public function msg($msg, $level = DEBUG_INFO)
{
$msg = filter_var(trim($msg), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
if (!empty($msg) && $_level & $level) {
$t = microtime(true);
$micro = round(($t - floor($t)) * 1000000);
$d = new DateTime(date('Y-m-d H:i:s.' . $micro, $t));
$results = $this->_mdb2->exec('INSERT INTO ' . $this->_table . '
(level, message, time)
VALUES (' . $this->_mdb2->quote($level, 'integer') . ', ' . $this->_mdb2->quote($msg, 'text') . ', ' . $this->_mdb2->quote($d->format('Y-m-d H:i:s.u'), 'text') . ')');
// error date with microtime ex. 2010-02-14 14:52:05.611046
if (PEAR::isError($results)) {
throw new exceptions($results->getMessage(), $results->getCode());
}
}
}