当前位置: 首页>>代码示例>>PHP>>正文


PHP MySQL::getTable方法代码示例

本文整理汇总了PHP中MySQL::getTable方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::getTable方法的具体用法?PHP MySQL::getTable怎么用?PHP MySQL::getTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MySQL的用法示例。


在下文中一共展示了MySQL::getTable方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: restoreBackLink

 /**
  * Формирует ссылку текущего раздела
  * 
  * @param Integer $sectionId ID раздела
  * @return String
  */
 public function restoreBackLink($sectionId)
 {
     $this->_sql->selAllWhere("URL", "`id`={$sectionId}");
     $res = $this->_sql->getTable();
     if ($res[0]["module"] != 0) {
         $urlPath[] = $res[0]["link"];
         $urlFull[] = $res[0];
     }
     $pid = $res[0]["pid"];
     while ($pid != 0) {
         $this->_sql->selAllWhere("URL", "`id`={$pid}");
         $subRes = $this->_sql->getTable();
         if ($subRes[0]["module"] != 0) {
             $urlPath[] = $subRes[0]["link"];
             $urlFull[] = $subRes[0];
         }
         $pid = $subRes[0]["pid"];
     }
     for ($index = count($urlPath) - 2; $index >= 0; --$index) {
         $link .= $urlPath["{$index}"] . "/";
     }
     if ($sectionId == $this->_currentID) {
         $this->_urlPath = $urlFull;
     }
     return "/" . $link;
 }
开发者ID:EntityFX,项目名称:QuikiJAR,代码行数:32,代码来源:Menu.php

示例2: getKeys

 /**
  * Получить список ключей в виде ассоциативного массива
  * 
  * @return Array
  */
 public static function getKeys()
 {
     self::dbConnector();
     self::$_sql->selAll("REGISTRY");
     $out = null;
     if (self::$_sql->getTable() != null) {
         foreach (self::$_sql->getTable() as $value) {
             $out[] = array("key" => $value["key"], "value" => unserialize($value["value_serealized"]));
         }
     }
     return $out;
 }
开发者ID:EntityFX,项目名称:QuikiJAR,代码行数:17,代码来源:Registry.php

示例3: chk

 public static function chk($username, $accounts_id = NULL)
 {
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'traceID' => "session_CFG");
     $userKey;
     //----------------------------------------------------------
     $chk = GenFun::error_CHK(array($username));
     //----------------------------------------------------------
     if ($chk['bool']) {
         if (is_null(Constants::$mysqli)) {
             GenFun::hostConnect();
         }
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     session_start();
     $session_id = GenFun::encrypt(session_id() . self::SALT . $username);
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = MySQL::getTable(SessionLog_const::TBL, array("session_id" => $session_id, "userKey" => $_COOKIE['user']));
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     $userKey = $username . "-" . rand(0, 13000000);
     setcookie("user", $userKey);
     //----------------------------------------------------------
     if (sizeof($chk['result']) == 0) {
         $chk = InsertINTO::go(array("tableID" => SessionLog_const::TBL, "setArr" => array("userKey" => $userKey, "accounts_id" => $accounts_id, "session_id" => $session_id)));
     } else {
         $chk = Update::go(SessionLog_const::TBL, array("userKey" => $userKey), array("session_id" => $session_id));
         if ($chk['bool']) {
             $chk['message'] = "session for this user has already been established!!!";
         }
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:41,代码来源:Session_v0.php

示例4: urlScaner

 /**
  * Сканирует URL как разделы. 
  * @throws Exception Раздел не найден
  */
 private function urlScaner()
 {
     $pid = 0;
     $flag = false;
     foreach ($this->_urlArray as $key => $value) {
         if (!$flag) {
             $queryWhere = "`link`='{$value}' AND `pid`={$pid}";
             $this->_sql->SelAllWhere("URL", $queryWhere);
             $arr = $this->_sql->getTable();
             $this->_arr = $arr[0];
             $pid = $arr[0]["id"];
             if ($arr == NULL) {
                 throw new Exception("Error", 404);
             } else {
                 if ($arr[0]["use_parameters"] == 1) {
                     $flag = true;
                 }
             }
         } else {
             $this->_parameters[] = $value;
         }
     }
 }
开发者ID:EntityFX,项目名称:QuikiJAR,代码行数:27,代码来源:Kernel.php

示例5: registerUser

 public function registerUser($email, $password, $addRowFunction = NULL, $sendConfirmationFunction = NULL, $reDirect = NULL)
 {
     Trace::output($this->traceID, "registerUser");
     //----------------------------------------------------------
     $this->password = $password;
     $this->email = $email;
     is_null($addRowFunction) ? $this->addRowFunction = array($this, "addAccountRow") : ($this->addRowFunction = $addRowFunction);
     $this->tblName = Accounts_const::TBL;
     is_null($addRowFunction) ? $this->addRowFunction = array($this, "registerConfirmationLink") : ($this->sendConfirmationFunction = $sendConfirmationFunction);
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'traceID' => "registerUser");
     //----------------------------------------------------------
     $chk = GenFun::error_CHK(array($email, $password));
     //----------------------------------------------------------
     if (!$chk["bool"]) {
         return $chk;
     }
     //----------------------------------------------------------
     /*if(!$this->character_CHK($email)) {
     			$chk['bool'] = false;
     			$chk['message'] = "email must only contain numbers, upper, and lowercase characters!!!";
     		}*/
     //----------------------------------------------------------
     if (!$this->character_CHK($password)) {
         $chk['bool'] = false;
         $chk['message'] = "Password must only contain numbers, upper, and lowercase characters!!!";
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = MySQL::getTable(Accounts_const::TBL, array("email" => $email));
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if (!$chk['bool'] || $chk['error']) {
         return $chk;
     }
     //----------------------------------------------------------
     if (sizeof($chk['result']) != 0) {
         $chk['bool'] = false;
         $chk['message'] = "email has already been registered!!!";
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = $this->start($chk['result'][0], 1, $this->sendConfirmationFunction, $reDirect);
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:51,代码来源:Account_v0.php

示例6: updateAssets

 private function updateAssets($id, $returnRow = true)
 {
     Trace::output($this->traceID, "updateAssets");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'traceID' => "updateAssets");
     $insertID = GlobalMas::$mysqli->insert_id;
     //----------------------------------------------------------
     $chk = Update::go(Projects_const::TBL, array(Projects_const::CLM_ASSETS_ID => $insertID), array("id" => $id));
     //----------------------------------------------------------
     if ($returnRow) {
         $chk = MySQL::getTable(Assets_const::TBL, array(Assets_const::CLM_ID => $insertID));
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:17,代码来源:SwfMngr_v0.php

示例7: getImages

 public function getImages($returnType = "XML")
 {
     Trace::output($this->traceID, "getImages");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, 'traceID' => "getImages");
     //----------------------------------------------------------
     $chk = MySQL::getTable(NicKelmanConst_v0::TBL_IMAGES);
     //----------------------------------------------------------
     if ($returnType == "XML") {
         if ($chk['bool']) {
             $chk = GenFun::json_to_xml(json_encode(array("item" => $chk['result'])), true);
         }
     }
     //----------------------------------------------------------
     return $chk;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:18,代码来源:NicKelman_v0.php


注:本文中的MySQL::getTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。