当前位置: 首页>>代码示例>>PHP>>正文


PHP MYSQL::SqlDelete方法代码示例

本文整理汇总了PHP中MYSQL::SqlDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP MYSQL::SqlDelete方法的具体用法?PHP MYSQL::SqlDelete怎么用?PHP MYSQL::SqlDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MYSQL的用法示例。


在下文中一共展示了MYSQL::SqlDelete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SetLogout

 function SetLogout(&$smarty, $redir = 'index')
 {
     $mysql = new MYSQL($smarty);
     $sql = $mysql->SqlDelete($smarty->cfg["prefix"] . 'log_online', "identity='" . $smarty->perfil["ID_MEMBER"] . "'");
     $result = mysql_query($sql);
     $cookie_url = explode($smarty->cfg["separate"], $this->url_parts($smarty->get_config_vars('http'), $smarty->cfg["separate"]));
     setcookie($smarty->cfg["cookie"], '', time() - 3600, $cookie_url[1], $cookie_url[0]);
     $smarty->perfil = $smarty->LoadPerfilGuest();
     $redir = $smarty->get_config_vars('http') . $smarty->cfg['index'] . '?page=' . $redir;
     header("location:{$redir}");
 }
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:11,代码来源:lib.Login.php

示例2: MYSQL

$tabela = 'produtos';
$mysql = new MYSQL($cfg);
if ($_POST['add']) {
    // adicionar registro.
    array_pop($_POST);
    $sql = $mysql->SqlInsert($tabela, $_POST);
    $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
    if ($request) {
        print "<h4>Registro Realizado com sucesso!!!</h4>";
    }
}
if ($_POST['del']) {
    // adicionar registro.
    $idde = trim($_POST['id']);
    $sql = $mysql->SqlDelete($tabela, "id = '{$idde}'");
    $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
    if ($request) {
        print "<h4>Registro Deletado com sucesso!!!</h4>";
    }
}
$result = $mysql->SqlSelect("SELECT id, nome, descricao, preco FROM {$tabela}");
if ($result) {
    ?>

<div class="col-md-6">
	<table class="table table-striped">
		<thead>
			<tr>
				<th>#</th>
				<th>Nome</th>
开发者ID:renatoinnocenti,项目名称:Serviceit-php,代码行数:30,代码来源:produtos_list.php

示例3: logMe

 public function logMe($ID_MEMBER, $min = '15')
 {
     $mysql = new MYSQL($this);
     $tabela = $this->cfg['db_prefix'] . 'log_online';
     $logme['identity'] = $ID_MEMBER;
     $perfil['member_lastlogin'] = $logme['logTime'] = 'NOW()';
     $perfil['member_lestonline'] = $logme['logoutTime'] = "NOW() + INTERVAL " . $min . " MINUTE";
     $logme['url'] = $this->actualpage['page_name'] ? $this->actualpage['page_name'] : "index";
     $logme['ip'] = $_SERVER['REMOTE_ADDR'];
     $request = $mysql->SqlSelect("Select identity From {$tabela} where ip = \"{$logme[ip]}\" and identity = \"{$ID_MEMBER}\"", __FILE__, __LINE__);
     mysql_affected_rows();
     if (mysql_affected_rows() > 0) {
         $sql = $mysql->SqlUpdate($tabela, $logme, "identity = {$ID_MEMBER}");
     } else {
         $sql = $mysql->SqlInsert($tabela, $logme);
     }
     $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
     $tabela = $this->cfg['db_prefix'] . 'log_online';
     $sql = $mysql->SqlUpdate($tabela, $logme, "identity =" . $ID_MEMBER);
     $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
     $sql = $mysql->SqlDelete($tabela, "logoutTime < NOW()");
     $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
     if ($ID_MEMBER > 0) {
         $tabela = $this->cfg['db_prefix'] . 'members';
         $sql = $mysql->SqlUpdate($tabela, $perfil, "ID_MEMBER =" . $ID_MEMBER);
         $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
     }
 }
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:28,代码来源:lib.StartSite.php


注:本文中的MYSQL::SqlDelete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。