• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Connector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetUserInformation

function GetUserInformation($payload)
{
    $connector = new Connector();
    $payload = json_decode($payload);
    $sql = "";
    $sql .= " SELECT";
    $sql .= " \t members_info.email";
    $sql .= " \t , members_info.lastname";
    $sql .= " \t , members_info.firstname";
    $sql .= " \t , members_info.middlename";
    $sql .= " \t , members_info.contactno";
    $sql .= " \t , members_info.status";
    $sql .= " \t , members_address.houseno";
    $sql .= " \t , members_address.companyname";
    $sql .= " \t , members_address.barangay";
    $sql .= " \t , members_address.city";
    $sql .= " \t , members_address.district";
    $sql .= " FROM members_info";
    $sql .= " INNER JOIN members_address ON";
    $sql .= " \tmembers_info.email = members_address.email";
    $sql .= " WHERE";
    $sql .= "\tmembers_info.email \t\t\t= '" . $payload->email . "'";
    $sql .= "\tAND members_info.password \t= '" . md5($payload->password) . "'";
    $mysqliQuery = mysqli_query($connector->GetConnection(), $sql);
    if ($mysqliQuery) {
        echo json_encode(mysqli_fetch_array($mysqliQuery));
    } else {
        echo 'error';
    }
}
开发者ID:almazorajan,项目名称:upshiftexpress,代码行数:30,代码来源:data_access.php


示例2: Insert

function Insert()
{
    include './connector.php';
    $con = new Connector();
    $NameOfLogin = $_SESSION['NameOfLogin'];
    $SurnameOfLogin = $_SESSION['SurnameOfLogin'];
    $ProgrammThatUserClick = $_SESSION['ProgrammThatUserClick'];
    $res = $con->prepare("INSERT INTO history VALUES('{$NameOfLogin}', '{$SurnameOfLogin}', '{$ProgrammThatUserClick}','null')");
}
开发者ID:GeorgeKaraxalios,项目名称:Management-of-Employees,代码行数:9,代码来源:AdminIndexPage.php


示例3: getGroups

 public function getGroups($aDatabase, $aPrefix, $aUser, $aPass, $aThrow)
 {
     $Connector = new Connector(SQL_HOST, $aDatabase, $aUser, $aPass, $aThrow);
     if ($Connector != null) {
         // only test if we can read the user table
         $TestQuery = $Connector->prepare('SELECT user_id FROM `' . $aPrefix . 'users` LIMIT 1');
         $Connector->run($TestQuery, $aThrow);
     }
     return null;
 }
开发者ID:zatoshi,项目名称:raidplaner,代码行数:10,代码来源:eqdkp.php


示例4: resolve

 /**
  * Resolves any url into absolute one using given url for missing parts.
  *
  * @param string $wc_url         Working copy url.
  * @param string $url_to_resolve Url to resolve.
  *
  * @return string
  */
 public function resolve($wc_url, $url_to_resolve)
 {
     if (strpos($url_to_resolve, '/') === false && $url_to_resolve !== 'trunk') {
         return dirname($wc_url) . '/' . $url_to_resolve;
     }
     if (preg_match('#^(/|\\^/)(.*)$#', $url_to_resolve, $regs)) {
         return str_replace(parse_url($wc_url, PHP_URL_PATH), '/' . $regs[2], $wc_url);
     }
     return $this->repositoryConnector->getProjectUrl($wc_url) . '/' . $url_to_resolve;
 }
开发者ID:console-helpers,项目名称:svn-buddy,代码行数:18,代码来源:UrlResolver.php


示例5: getGroups

 public function getGroups($aDatabase, $aPrefix, $aUser, $aPass, $aThrow)
 {
     $Connector = new Connector(SQL_HOST, $aDatabase, $aUser, $aPass, $aThrow);
     if ($Connector != null) {
         $GroupQuery = $Connector->prepare('SELECT id, title FROM `' . $aPrefix . 'usergroups` ORDER BY title');
         $Groups = array();
         $GroupQuery->loop(function ($Group) use(&$Groups) {
             array_push($Groups, array('id' => $Group['id'], 'name' => $Group['title']));
         }, $aThrow);
         return $Groups;
     }
     return null;
 }
开发者ID:zatoshi,项目名称:raidplaner,代码行数:13,代码来源:joomla3.php


示例6: GetShippingPrices

 public function GetShippingPrices()
 {
     $connector = new Connector();
     $sql = " SELECT";
     $sql .= "\tdistancefrom";
     $sql .= " \t, distanceto";
     $sql .= "\t, price";
     $sql .= " FROM shipping_prices";
     $mysqliQuery = mysqli_query($connector->GetConnection(), $sql);
     $output = array();
     while ($row = mysqli_fetch_array($mysqliQuery, MYSQLI_ASSOC)) {
         array_push($output, $row);
     }
     return json_encode($output);
 }
开发者ID:almazorajan,项目名称:upshiftexpress,代码行数:15,代码来源:classes.php


示例7: __construct

 public function __construct()
 {
     $this->connection = Connector::getConnection();
     $this->builder = $this->connection->createQueryBuilder();
     $this->setTable(get_class($this) . "s");
     $this->setPrimary("id");
 }
开发者ID:akbarjimi,项目名称:dialog,代码行数:7,代码来源:Model.php


示例8: msgQueryLocations

function msgQueryLocations($aRequest)
{
    global $gSite;
    global $gGame;
    loadGameSettings();
    $Out = Out::getInstance();
    if (validRaidlead()) {
        $Connector = Connector::getInstance();
        // Locations
        $ListLocations = $Connector->prepare('Select * FROM `' . RP_TABLE_PREFIX . 'Location` WHERE Game = :Game ORDER BY Name');
        $ListLocations->bindValue(':Game', $gGame['GameId'], PDO::PARAM_STR);
        $Locations = array();
        $ListLocations->loop(function ($Data) use(&$Locations) {
            $LocationData = array('id' => $Data['LocationId'], 'name' => $Data['Name'], 'image' => $Data['Image']);
            array_push($Locations, $LocationData);
        });
        $Out->pushValue('location', $Locations);
        // Images
        $Images = @scandir('../themes/icons/' . $gSite['Iconset'] . '/raidsmall');
        $ImageList = array();
        if ($Images != null) {
            foreach ($Images as $Image) {
                if (strripos($Image, '.png') !== false) {
                    array_push($ImageList, $Image);
                }
            }
        }
        $Out->pushValue('locationimage', $ImageList);
    } else {
        $Out->pushError(L('AccessDenied'));
    }
}
开发者ID:zatoshi,项目名称:raidplaner,代码行数:32,代码来源:message_query_locations.php


示例9: msgRaidList

function msgRaidList($aRequest)
{
    if (validUser()) {
        global $gGame;
        loadGameSettings();
        $Out = Out::getInstance();
        $Connector = Connector::getInstance();
        // Get next 6 raids
        $NextRaidQuery = $Connector->prepare('Select ' . RP_TABLE_PREFIX . 'Raid.*, ' . RP_TABLE_PREFIX . 'Location.*, ' . RP_TABLE_PREFIX . 'Attendance.CharacterId, ' . RP_TABLE_PREFIX . 'Attendance.UserId, ' . RP_TABLE_PREFIX . 'Attendance.Status, ' . RP_TABLE_PREFIX . 'Attendance.Class, ' . RP_TABLE_PREFIX . 'Attendance.Role, ' . RP_TABLE_PREFIX . 'Attendance.Comment, ' . 'UNIX_TIMESTAMP(' . RP_TABLE_PREFIX . 'Raid.Start) AS StartUTC, ' . 'UNIX_TIMESTAMP(' . RP_TABLE_PREFIX . 'Raid.End) AS EndUTC ' . 'FROM `' . RP_TABLE_PREFIX . 'Raid` ' . 'LEFT JOIN `' . RP_TABLE_PREFIX . 'Location` USING(LocationId) ' . 'LEFT JOIN `' . RP_TABLE_PREFIX . 'Attendance` USING(RaidId) ' . 'LEFT JOIN `' . RP_TABLE_PREFIX . 'Character` USING (CharacterId) ' . 'WHERE ' . RP_TABLE_PREFIX . 'Raid.Start >= FROM_UNIXTIME(:Start) ' . 'AND ' . RP_TABLE_PREFIX . 'Location.Game = :Game ' . 'ORDER BY ' . RP_TABLE_PREFIX . 'Raid.Start, ' . RP_TABLE_PREFIX . 'Raid.RaidId');
        $NextRaidQuery->bindValue(':Start', mktime(0, 0, 0), PDO::PARAM_INT);
        $NextRaidQuery->bindValue(':Game', $gGame['GameId'], PDO::PARAM_STR);
        parseRaidQuery($aRequest, $NextRaidQuery, 6);
        // Load raid history
        $RaidHistoryQuery = $Connector->prepare('Select ' . RP_TABLE_PREFIX . 'Raid.*, ' . RP_TABLE_PREFIX . 'Location.*, ' . 'UNIX_TIMESTAMP(' . RP_TABLE_PREFIX . 'Raid.Start) AS StartUTC, ' . 'UNIX_TIMESTAMP(' . RP_TABLE_PREFIX . 'Raid.End) AS EndUTC ' . 'FROM `' . RP_TABLE_PREFIX . 'Raid` ' . 'LEFT JOIN `' . RP_TABLE_PREFIX . 'Location` USING(LocationId) ' . 'WHERE ' . RP_TABLE_PREFIX . 'Raid.Start < FROM_UNIXTIME(:Start) ' . 'AND ' . RP_TABLE_PREFIX . 'Location.Game = :Game ' . 'ORDER BY Start DESC LIMIT ' . intval($aRequest['offset']) . ', ' . intval($aRequest['count']));
        $RaidHistoryQuery->bindValue(':Start', mktime(0, 0, 0), PDO::PARAM_INT);
        $RaidHistoryQuery->bindValue(':Game', $gGame['GameId'], PDO::PARAM_STR);
        $RaidList = array();
        $RaidHistoryQuery->loop(function ($Data) use(&$RaidList) {
            $StartDate = getdate($Data['StartUTC']);
            $EndDate = getdate($Data['EndUTC']);
            $Raid = array('id' => $Data['RaidId'], 'location' => $Data['Name'], 'stage' => $Data['Stage'], 'image' => $Data['Image'], 'size' => $Data['Size'], 'startDate' => $StartDate['year'] . '-' . leadingZero10($StartDate['mon']) . '-' . leadingZero10($StartDate['mday']), 'start' => leadingZero10($StartDate['hours']) . ':' . leadingZero10($StartDate['minutes']), 'endDate' => $EndDate['year'] . '-' . leadingZero10($EndDate['mon']) . '-' . leadingZero10($EndDate['mday']), 'end' => leadingZero10($EndDate['hours']) . ':' . leadingZero10($EndDate['minutes']));
            array_push($RaidList, $Raid);
        });
        $Out->pushValue('history', $RaidList);
    } else {
        $Out = Out::getInstance();
        $Out->pushError(L('AccessDenied'));
    }
}
开发者ID:zatoshi,项目名称:raidplaner,代码行数:29,代码来源:message_raid_list.php


示例10: msgQueryNewRaidData

function msgQueryNewRaidData($aRequest)
{
    $Out = Out::getInstance();
    if (validRaidlead()) {
        $Connector = Connector::getInstance();
        // Settings
        $NewRaidSettings = $Connector->prepare('SELECT Name, IntValue, TextValue FROM `' . RP_TABLE_PREFIX . 'Setting`');
        $IntOfInterest = array('RaidSize', 'RaidStartHour', 'RaidStartMinute', 'RaidEndHour', 'RaidEndMinute', 'StartOfWeek');
        $TextOfInterest = array('RaidMode');
        $Settings = array();
        $NewRaidSettings->loop(function ($Data) use(&$Settings, $IntOfInterest, $TextOfInterest) {
            $KeyValue = array('name' => $Data['Name'], 'value' => null);
            if (in_array($Data['Name'], $IntOfInterest)) {
                $KeyValue['value'] = $Data['IntValue'];
            } elseif (in_array($Data['Name'], $TextOfInterest)) {
                $KeyValue['value'] = $Data['TextValue'];
            }
            array_push($Settings, $KeyValue);
        });
        $Out->pushValue('setting', $Settings);
        // Locations
        msgQueryLocations($aRequest);
    } else {
        $Out->pushError(L('AccessDenied'));
    }
}
开发者ID:zatoshi,项目名称:raidplaner,代码行数:26,代码来源:message_query_newraid.php


示例11: getRequireOnce

 public function getRequireOnce($path)
 {
     if ($this->exists($path)) {
         return \Connector::needOnce($path);
     } else {
         throw new FileNotFoundException($path);
     }
 }
开发者ID:ar-framework-labs,项目名称:kernel,代码行数:8,代码来源:Filesystem.php


示例12: AddBook

function AddBook($payload)
{
    $book = new Book();
    $connector = new Connector();
    $conn = $connector->GetConnection();
    $payload = json_decode($payload);
    $book->sender->SetName($payload->sender->name);
    $book->sender->SetHouseNo($payload->sender->houseNo);
    $book->sender->SetCompanyName($payload->sender->companyName);
    $book->sender->SetBarangay($payload->sender->barangay);
    $book->sender->SetCity($payload->sender->city);
    $book->sender->SetDistrict($payload->sender->district);
    $book->sender->SetContactNo($payload->sender->contactNo);
    $book->receiver->SetName($payload->receiver->name);
    $book->receiver->SetHouseNo($payload->receiver->houseNo);
    $book->receiver->SetCompanyName($payload->receiver->companyName);
    $book->receiver->SetBarangay($payload->receiver->barangay);
    $book->receiver->SetCity($payload->receiver->city);
    $book->receiver->SetDistrict($payload->receiver->district);
    $book->receiver->SetContactNo($payload->receiver->contactNo);
    $book->SetServiceLevel($payload->serviceLevel);
    $book->SetSize($payload->size);
    $book->SetHeight($payload->height);
    $book->SetLength($payload->length);
    $book->SetWidth($payload->width);
    $book->SetWeight($payload->weight);
    $book->SetChargeableWeight($payload->chargeableWeight);
    $book->SetDimension($payload->dimension);
    $book->SetInsurance($payload->insurance);
    $book->SetDeclaredValue($payload->declaredValue);
    $book->SetPaymentMethod($payload->paymentMethod);
    $payload->cod->bankName = isset($payload->cod->bankName) ? $payload->cod->bankName : "";
    $payload->cod->accountName = isset($payload->cod->accountName) ? $payload->cod->accountName : "";
    $payload->cod->accountNo = isset($payload->cod->accountNo) ? $payload->cod->accountNo : "";
    $payload->cod->amount = isset($payload->cod->amount) ? $payload->cod->amount : 0;
    $book->cod->SetBankName($payload->cod->bankName);
    $book->cod->SetAccountName($payload->cod->accountName);
    $book->cod->SetAccountNo($payload->cod->accountNo);
    $book->cod->SetAmount($payload->cod->amount);
    $book->SetAmountDue($payload->amountDue);
    if ($book->SaveBooking()[1]) {
        echo json_encode($book->SaveBooking());
    } else {
        echo json_encode($book->SaveBooking());
    }
}
开发者ID:almazorajan,项目名称:upshiftexpress,代码行数:46,代码来源:data_access.php


示例13: get_total_amount_of

 private function get_total_amount_of($type, $date)
 {
     $mysqli = Connector::get_connection();
     $query_result = $mysqli->query("SELECT sum(amount) FROM {$type}s  WHERE date = '{$date}' AND user_id = {$_SESSION['id_user']}");
     $result = $query_result->fetch_assoc();
     return format_amount($result['sum(amount)']);
     $mysqli->close();
 }
开发者ID:andriykonoz,项目名称:cashTracer,代码行数:8,代码来源:model_statistic.php


示例14: getGroups

 public function getGroups($aDatabase, $aPrefix, $aUser, $aPass, $aThrow)
 {
     $Connector = new Connector(SQL_HOST, $aDatabase, $aUser, $aPass, $aThrow);
     if ($Connector != null) {
         $OptionsQuery = $Connector->prepare('SELECT option_value FROM `' . $aPrefix . 'options` WHERE option_name = "' . $aPrefix . 'user_roles" LIMIT 1');
         $Option = $OptionsQuery->fetchFirst($aThrow);
         $Groups = array();
         $Roles = unserialize($Option['option_value']);
         if (is_array($Roles)) {
             foreach ($Roles as $Role => $Options) {
                 array_push($Groups, array('id' => strtolower($Role), 'name' => $Role));
             }
         }
         return $Groups;
     }
     return null;
 }
开发者ID:zatoshi,项目名称:raidplaner,代码行数:17,代码来源:wp.php


示例15: __construct

 /**
  * ProwlConnector.class provides access to the
  * webservice interface of Prowl by using
  * cUrl + SSL. Use the setters of this class
  * to provide the mandatory parameters.
  *
  * @throws \RuntimeException
  */
 public function __construct()
 {
     parent::__construct();
     $curl_info = curl_version();
     // Checks for cURL function and SSL version. Thanks Adrian Rollett!
     if (empty($curl_info['ssl_version'])) {
         throw new \RuntimeException('Your cUrl Extension does not support SSL.');
     }
 }
开发者ID:Ernie69,项目名称:spotweb,代码行数:17,代码来源:SecureConnector.php


示例16: __construct

 /**
  * Initialise les variables en tableaux, et crée l'ensemble des catégories question de la partie
  */
 function __construct()
 {
     $bddConnect = new Connector();
     $this->tabCategorie = array();
     $this->tabTheme1 = array();
     $this->tabTheme2 = array();
     $this->tabQuestion = array();
     $this->tabReponse = array();
     $this->tabExplication = array();
     // étape actuelle de la partie (1 étape = 1 question)
     $this->position = 0;
     // création et récupération des catégories de la partie
     $Categorie = new Categorie($bddConnect->getBdd());
     $nomCategorie = $Categorie->getNomCategorie();
     for ($i = 0; $i < sizeof($nomCategorie); $i++) {
         // création et récupération des thèmes de la partie associés aux catégories choisies
         $Theme = new Theme($bddConnect->getBdd(), $nomCategorie[$i]);
         $idTheme = $Theme->getIdTheme();
         $theme1 = $Theme->getTheme1();
         $theme2 = $Theme->getTheme2();
         for ($j = 0; $j < sizeof($theme1); $j++) {
             // cration et récupération des questions de la partie associées aux thémes
             $Question = new Question($bddConnect->getBdd(), $idTheme[$j]);
             $intituleQuestion = $Question->getIntituleQuestion();
             $reponse = $Question->getReponse();
             $explication = $Question->getExplication();
             for ($h = 0; $h < sizeof($intituleQuestion); $h++) {
                 // 1 indice de chauqe tableau équivaut au catégorie / theme question / ... de la question actuelle
                 array_push($this->tabCategorie, $nomCategorie[$i]);
                 array_push($this->tabTheme1, $theme1[$j]);
                 array_push($this->tabTheme2, $theme2[$j]);
                 array_push($this->tabQuestion, $intituleQuestion[$h]);
                 array_push($this->tabReponse, $reponse[$h]);
                 // s'il existe ou non une explication de la réponse
                 if (isset($explication[$h])) {
                     array_push($this->tabExplication, $explication[$h]);
                 } else {
                     array_push($this->tabExplication, null);
                 }
             }
         }
     }
 }
开发者ID:EvanGuelard,项目名称:BurgerQuiz,代码行数:46,代码来源:game.class.php


示例17: __construct

 private $_item;
 private $quantity;
 private $price;
 private $_dbase;
 //  Class Constructor function
 public function __construct()
 {
开发者ID:jzagalo,项目名称:store,代码行数:7,代码来源:database_store.php


示例18: register

 /**
  * Register all context hooks
  *
  * @return void
  */
 public function register()
 {
     parent::register();
     add_action('admin_head', array($this, 'highlight_field'));
     add_action('admin_enqueue_scripts', array($this, 'enqueue_jquery_color'));
     add_action(sprintf('update_option_theme_mods_%s', get_option('stylesheet')), array($this, 'log_theme_modification'), 10, 2);
 }
开发者ID:rclilly,项目名称:stream,代码行数:12,代码来源:class-connector-settings.php


示例19: __construct

 /**
  * Constructor
  * Loads required models
  */
 public function __construct()
 {
     parent::__construct();
     // Load linking models
     $this->ci->load->model('tag_type_m');
     $this->ci->load->model('item_has_tag_m');
 }
开发者ID:ohjack,项目名称:csc385,代码行数:11,代码来源:Linker.php


示例20: __construct

 public function __construct($res, $type = false, $item_type = false, $data_type = false)
 {
     if (!$item_type) {
         $item_type = "OptionsDataItem";
     }
     parent::__construct($res, $type, $item_type, $data_type);
 }
开发者ID:ValentinNikolaev,项目名称:Laravel5-dhtmlxScheduler-demo,代码行数:7,代码来源:options_connector.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ConnectorUtils类代码示例发布时间:2022-05-23
下一篇:
PHP ConnectionManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap