本文整理匯總了PHP中sql::get_sql方法的典型用法代碼示例。如果您正苦於以下問題:PHP sql::get_sql方法的具體用法?PHP sql::get_sql怎麽用?PHP sql::get_sql使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sql
的用法示例。
在下文中一共展示了sql::get_sql方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: quantri
<?php
session_start();
if (@$_SESSION["id_admin"]) {
$user = $_SESSION["user_admin"];
require_once 'config.php';
require_once DIR . 'class.quantri.php';
$qt = new quantri();
require_once DIR . 'class.sql.php';
$sql = new sql();
if (@$_POST['delete']) {
$type = 3;
$table = $_POST['page'];
$id = $_POST['id'];
$sql->get_sql($type, $table, $user, $id);
$sql->executable();
}
if (@$_POST['status']) {
$type = 7;
$table = $_POST['page'];
$set = $_POST['set'];
$id = $_POST['id'];
$sql->get_sql($type, $table, $user, $set, $id);
echo $sql->executable();
}
if (isset($_POST['KiemTraUser'])) {
$user = $_POST['KiemTraUser'];
$total = mysql_result($qt->Users_KiemTraUser($user), 0);
if ($total == 0 & eregi("^[[:alnum:]]+\$", $user)) {
echo '<font color="#00CC00">Username hợp lệ</font>';
} else {
示例2: sql
$sql = new sql();
if (!empty($_POST)) {
$field = array_keys($_POST);
echo '<pre>';
print_r($field);
echo '</pre>';
$value = array_values($_POST);
echo '<pre>';
print_r($value);
echo '</pre>';
$table = 'baiviet';
$id = '1';
// $qr = "UPDATE `{$table}` SET `delete`=1 WHERE `id`='{$id}'";
// mysql_query($qr) or ($loi = $errors[4]);
// echo $loi;
$sql->get_sql(1, $table, $field, $value, 1);
$zzz = $sql->executable();
echo '<pre>';
print_r($zzz);
echo '<pre>';
$m = explode('_ac', $p);
if (count($m) > 0) {
echo "baiviet";
} else {
echo "baiviet_ac";
}
}
?>
<p>
<form action="" method="post" name="form1">
<input type="text" name="name" /><br />