當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DB::query方法代碼示例

本文整理匯總了PHP中app\DB::query方法的典型用法代碼示例。如果您正苦於以下問題:PHP DB::query方法的具體用法?PHP DB::query怎麽用?PHP DB::query使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\DB的用法示例。


在下文中一共展示了DB::query方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $welcome = $connect->query('SELECT * FROM welcome', []);
     $this->welcome = $welcome;
 }
開發者ID:Mike0712,項目名稱:dom8,代碼行數:6,代碼來源:Main.php

示例2: oath

 public static function oath($email, $password)
 {
     $p = DB::query()->select('password', 'id')->from('user')->where('email', '=', $email)->and_where('`check-e`', '=', 1)->execute()->current();
     if ($p === false) {
         return false;
     }
     $data = unserialize($p['password']);
     $user = new Users();
     if ($user->hash_check($password, $data['hash'], $data['salt'])) {
         STD::set_cookie('rememberme', $p['id']);
         return true;
     }
     return false;
 }
開發者ID:Jurasikt,項目名稱:bso,代碼行數:14,代碼來源:Users.php

示例3: dirname

//include dirname(__DIR__)."/vendor/autoload.php";
//NAMESPACE APP
$app = new app();
$constante = new constante();
$date_format = new date_format();
$fonction = new fonction();
$DB = new DB();
$ssh2 = new ssh2();
//NAMESPACE API
$push_cls = new push();
//NAMESPACE ASC
$salarie_cls = new salarie();
$presta_cls = new prestation();
//NAMESPACE CONFIG
$mod_cls = new modules();
if (isset($_SESSION['account']['connect']) && $_SESSION['account']['connect'] == 1) {
    $user = $DB->query("SELECT * FROM users WHERE pseudo = :pseudo", array("pseudo" => $_SESSION['account']['pseudo']));
}
//Import des Informations de configuration
$mod_salarie = $mod_cls->active_salarie();
$mod_prestation = $mod_cls->active_prestation();
$mod_billetterie = $mod_cls->active_billetterie();
$mod_remboursement = $mod_cls->active_remboursement();
$mod_residente = $mod_cls->active_non_residente();
$conf_salarie = $mod_cls->salarie();
$conf_presta = $mod_cls->prestation();
$conf_billetterie = $mod_cls->billetterie();
$conf_remboursement = $mod_cls->remboursement();
//COMPOSER
require dirname(__DIR__) . "/vendor/autoload.php";
use Ifsnop\Mysqldump as IMysqldump;
開發者ID:CRIDIP-SWD,項目名稱:ICEGEST_V2,代碼行數:31,代碼來源:classe.php

示例4: __construct

 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $train = $connect->query('SELECT * FROM train', []);
     $this->train = $train;
 }
開發者ID:Mike0712,項目名稱:dom8,代碼行數:6,代碼來源:Shedule.php

示例5: get_var

 /**
  * возращает значение сохраненной переменой 
  * @param  $name    string название переменной
  * @return mixed    false если не существует поля $name
  */
 public static function get_var($name)
 {
     $val = DB::query()->select('value')->from(DB::$var)->where('var_name', '=', $name)->execute()->current('value');
     if ($val) {
         return unserialize($val);
     } else {
         return false;
     }
 }
開發者ID:Jurasikt,項目名稱:bso,代碼行數:14,代碼來源:DB.php

示例6: realpath

<?php

use App\DB;
define('EXT', '.php');
define('DOCROOT', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
define('APPPATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'Application' . DIRECTORY_SEPARATOR);
require_once APPPATH . 'autoload' . EXT;
$file = DOCROOT . 'install/sql.sql';
$all = file_get_contents($file);
$sql = preg_split('/;/', $all);
foreach ($sql as $item) {
    if ($item != '') {
        $res = DB::query($item)->execute()->_error;
        if ($res == '') {
            echo "<pre>Таблица создана успешна</pre>";
        } else {
            echo "<pre>{$res}</pre>";
        }
    }
}
開發者ID:Jurasikt,項目名稱:bso,代碼行數:20,代碼來源:install.php

示例7: __construct

 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $gallery = $connect->query('SELECT * FROM gallery', []);
     $this->gallery = $gallery;
 }
開發者ID:Mike0712,項目名稱:dom8,代碼行數:6,代碼來源:Gallery.php


注:本文中的app\DB::query方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。