当前位置: 首页>>代码示例>>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;未经允许,请勿转载。