本文整理汇总了PHP中Sql::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Sql::delete方法的具体用法?PHP Sql::delete怎么用?PHP Sql::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sql
的用法示例。
在下文中一共展示了Sql::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteOld
static function deleteOld()
{
PDOSql::$pdobj = pdoConnect();
$id = Sql::esc($id);
$iduser = Sql::esc($_SESSION['userID']);
$res = Sql::delete("DELETE from notifications WHERE status = '1' AND view_date < NOW() - INTERVAL 1 month");
return array('success' => true, 'data' => $res, 'msg' => '');
}
示例2: excluir
/**
*
* @author Cleiton Perin
* @param object $_prClasse
* Classe
* @param string $_prChave
* Chave para Exclusao
* @param boolean $_prPadrao
* Informa se a Exclussão e por Chave ou por Condicao
* @param object $Transacao
* Transacao corrente
* @return mixed True ou String dependendo do retorno do Banco
*/
public function excluir(Model $_prClasse, $_prChave = null, $_prPadrao = true, Sql &$Transacao = null)
{
if ($_prChave == null) {
$_prChave = $_prClasse->get('chave');
}
if ($Transacao == null) {
$Sql = new Sql();
$Sql->inicio();
if ($_prPadrao) {
$Sql->delete($_prClasse->get('tabela'), sprintf("%s=%s", $_prChave, $_prClasse->get($_prChave)));
} else {
$Sql->delete($_prClasse->get('tabela'), $_prChave);
}
$RETORNO = "";
$Sql->commit($RETORNO);
return $RETORNO;
} else {
if ($_prPadrao) {
$Transacao->delete($_prClasse->get('tabela'), sprintf("%s=%s", $_prChave, $_prClasse->get($_prChave)));
} else {
$Transacao->delete($_prClasse->get('tabela'), $_prChave);
}
}
}
示例3: delete
/**
* Delete Tag
* @return bollean
*/
public function delete()
{
$pk = array(self::ID_TAG => $this->getIdTag());
$sql = new Sql();
return $sql->delete(self::TABLE, $pk);
}
示例4: delete
/**
* Delete
* @return bollean
*/
public function delete()
{
$pk = array(self::ISOLANG => $this->getIsoLang());
$sql = new Sql();
return $sql->delete(self::TABLE, $pk);
}
示例5: delete
static function delete($table, $where = '', $connection = 'default')
{
return static::query(\Sql::delete($table, $where), $connection);
}
示例6: action_delete_file
function action_delete_file($id_file)
{
Sql::delete('files', 'id = ?', $id_file);
}