示例#1
0
function get_value_2dk($table, $dk1, $dk1_value, $dk2, $dk2_value, $field)
{
    $sql_select = "select * from {$table} WHERE {$dk1}='{$dk1_value}' AND {$dk2}='{$dk2_value}'";
    //echo $sql_select;
    $set_select = sql_set($sql_select);
    if (isset($set_select)) {
        return $set_select[$field];
    } else {
        return false;
    }
}
示例#2
0
 function set_value($value)
 {
     global $sql_stmts;
     $this->_value = $value;
     if ($this->issql and $this->_id !== NULL) {
         sql_set(sql_stmt("pron_id->pron_value="), $this->_value, ["i", &$this->_id]);
     }
 }
示例#3
0
 function set_hints($all_hints)
 {
     $all_hints = json_encode($all_hints);
     sql_set(sql_stmt("quiz_id->hints"), $all_hints, ["i", &$this->_id]);
 }
示例#4
0
 function set_lang($lang)
 {
     global $sql_stmts;
     $this->_lang = $lang;
     if ($this->issql and $this->_id !== NULL) {
         sql_set(sql_stmt("word_id->word_lang="), $this->_lang, ["i", &$this->_id]);
     }
 }
示例#5
0
 function set_value($value)
 {
     global $sql_stmts;
     $this->_value = $value;
     /*if ($this->issql and $this->_id !== NULL)
     		error_log($this->_id." -> $value");/**/
     if ($this->issql and $this->_id !== NULL) {
         sql_set(sql_stmt("form_id->form_value="), $this->_value, ["i", &$this->_id]);
     }
 }
示例#6
0
<?php

include "config.php";
include "header.php";
if (isset($_GET['rv']) && isset($_COOKIE['name'])) {
    $id_rv = $_GET['rv'];
    //Lay du lieu
    //echo $id_rv;
    $sql_select_rv = "select * from tin_rao_vat where id_rv='{$id_rv}'";
    $kq_select_rv = sql_set($sql_select_rv);
    $kq = $kq_select_rv;
    $author_rv = $kq['author_rv'];
    //echo $author_rv;
    $date_rv = $kq['date_rv'];
    //echo $date_rv;
    $ex_date_rv = $kq['ex_date_rv'];
    //XU LY LOẠI TIN MUA BÁN
    if ($kq['loai_rv'] != "sell") {
        $loai_rv = "mua";
    } else {
        $loai_rv = "bán";
    }
    //echo $loai_rv;
    $cat_rv = get_value_dk('danh_muc', 'cat_id', $kq['cat_rv'], 'cat_name');
    //echo $cat_rv;
    //XU LY + VIEW;
    $view_rv = $kq['view_rv'] + 1;
    $sql_update_view = "";
    //
    $title_rv = $kq['title_rv'];
    //echo $title_rv;
示例#7
0
 function set_value($value)
 {
     $value = preg_replace('/ {2,}/', ' ', trim($value));
     $this->_value = $value;
     if ($this->issql and $this->_id !== NULL) {
         sql_set(sql_stmt("def_id->def_value="), $this->_value, ["i", &$this->_id]);
     }
 }