本文整理汇总了PHP中sql::dquery方法的典型用法代码示例。如果您正苦于以下问题:PHP sql::dquery方法的具体用法?PHP sql::dquery怎么用?PHP sql::dquery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sql
的用法示例。
在下文中一共展示了sql::dquery方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_login_info
function check_login_info($_username, $_password) {
$sql = new sql();
$query = "select id, password, date_creation from qcs_users where username = '".$_username."'";
$rs = $sql -> dquery($query);
if ($rs[0] > 0) {
$date_creation = substr($rs[1]['date_creation'], 0, 10);
$input_password = md5(md5($_password).$date_creation);
$db_password = $rs[1]['password'];
$user_id = $rs[1]['id'];
if ($input_password != $db_password)
$user_id = -1;
// echo "password = " . $_password;
// echo "rs[1]['password'] = " . $rs[1]['password'];
// exit();
if($rs[1]['password'] == md5($_password))
$user_id = $rs[1]['id'];
}
else $user_id = -1;
$sql -> dclose();
return $user_id;
}
示例2: get_users
function get_users() {
$sql = new sql();
$query = "select * from user where role != 'super'";
$_arr = $sql -> dquery($query);
$sql -> dclose();
return $_arr;
}
示例3: email_exists
function email_exists($_email) {
$sql = new sql();
$query = "select id from member where email = '".$_email."'";
$rs = $sql -> dquery($query);
$sql -> dclose();
if ($rs[0] > 0) return FALSE;
else return TRUE;
}
示例4: htmlspecialchars
/*
name: confirm.php
date: 2009.02.11
author: Jimmy Roy for Netixy
*/
include_once '_sysinc/tools.php';
include_once '_sysinc/sql.php';
require_once "phpmailer/PHPMailerAutoload.php";
$target = '';
if (isset($_GET["email"])) {
// get data from url
$email = htmlspecialchars($_GET["email"]);
$sql = new sql();
$query = "select email from qcs_members where email = '" . $email . "'";
// echo "query= " . $query . "<br/>";
$rs = $sql->dquery($query);
$sql->dclose();
if ($rs[0] > 0) {
// echo "else";
$target = '/confirmation';
$update_data[] = "status = 1";
$cc = implode(',', $update_data);
$sql = new sql();
$query = "update qcs_members set " . $cc . " where email = '" . $email . "'";
$sql->dchange($query);
$sql->dclose();
$mail = new PHPMailer();
$mail->isSMTP();
// Set mailer to use SMTP
$mail->Host = '127.0.0.1';
// Specify main and backup server