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


PHP QueryExecutor类代码示例

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


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

示例1: getListAllTeamDashboard

 protected function getListAllTeamDashboard($sqlQuery)
 {
     $tab = QueryExecutor::execute($sqlQuery);
     $ret = array();
     for ($i = 0; $i < count($tab); $i++) {
         $ret[$i] = $this->readRowAllTeamDashboard($tab[$i]);
     }
     return $ret;
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:9,代码来源:TeamsMySqlExtDAO.class.php

示例2: getRowResponse

 /**
  * Get row
  *
  * @return ChallengeResponsesMySql 
  */
 protected function getRowResponse($sqlQuery)
 {
     $tab = QueryExecutor::execute($sqlQuery);
     if (count($tab) == 0) {
         return null;
     }
     return $this->readRowResponse($tab[0]);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:13,代码来源:ChallengeResponsesMySqlExtDAO.class.php

示例3: executeInsert

 public static function executeInsert($sqlQuery)
 {
     global $logger;
     $result = QueryExecutor::executeUpdate($sqlQuery);
     $logger->debug("Execute Update Result: " . print_r($result, true));
     $lastInsertedId = mysql_insert_id();
     $logger->debug("Execute Insert Result: '{$lastInsertedId}'");
     return $lastInsertedId;
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:9,代码来源:QueryExecutor.class.php

示例4: getListUsers

 protected function getListUsers($sqlQuery)
 {
     $tab = QueryExecutor::execute($sqlQuery);
     $ret = array();
     for ($i = 0; $i < count($tab); $i++) {
         $ret[$i] = $this->readUserRow($tab[$i]);
     }
     return $ret;
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:9,代码来源:UserInfoMySqlExtDAO.class.php

示例5: getStudentClassScoreList

 protected function getStudentClassScoreList($sqlQuery)
 {
     $tab = QueryExecutor::execute($sqlQuery);
     $ret = array();
     for ($i = 0; $i < count($tab); $i++) {
         $ret[$i] = $this->readStudentClassScoreRow($tab[$i]);
     }
     return $ret;
 }
开发者ID:seiran1944,项目名称:slate,代码行数:9,代码来源:MyStudentDAO.php

示例6: getLastTemporadaOfSerie

 public function getLastTemporadaOfSerie($idSerie)
 {
     $sql = 'SELECT MAX(temporada) temporada FROM vod WHERE id_serie = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($idSerie);
     $tab = QueryExecutor::execute($sqlQuery);
     if (count($tab) == 0) {
         return null;
     }
     return $tab[0]['temporada'];
 }
开发者ID:roberto-pina,项目名称:ventana-educativa,代码行数:11,代码来源:VodMySqlExtDAO.class.php

示例7: executeInsert

 /**
  * Insert row to table
  */
 protected function executeInsert($sqlQuery)
 {
     return QueryExecutor::executeInsert($sqlQuery);
 }
开发者ID:njr1466,项目名称:akipom,代码行数:7,代码来源:BannersuperiorMySqlDAO.class.php

示例8: executeInsert

 public static function executeInsert($sqlQuery)
 {
     QueryExecutor::executeUpdate($sqlQuery);
     return mysql_insert_id();
 }
开发者ID:atriches,项目名称:prova,代码行数:5,代码来源:QueryExecutor.class.php

示例9: getFields

function getFields($table)
{
    $sql = 'DESC ' . $table;
    return QueryExecutor::execute(new SqlQuery($sql));
}
开发者ID:renduples,项目名称:alibtob,代码行数:5,代码来源:generate.php

示例10: getStudentScoreList

 protected function getStudentScoreList($sqlQuery)
 {
     $tab = QueryExecutor::execute($sqlQuery);
     return $tab;
 }
开发者ID:seiran1944,项目名称:slate,代码行数:5,代码来源:StudentScoreDAO.php

示例11: registerFilters

 private function registerFilters()
 {
     $command = $this->register('filters');
     // set description
     $command->setDescription('Returns possible filters for query');
     // set arguments
     $command->setDefinition(array(new InputOption('filters', null, InputOption::VALUE_REQUIRED, 'Formatted filters: filter1=value1,value2;filter2=value3,value4'), new InputArgument('query', InputArgument::REQUIRED, 'Query')));
     // set action
     $command->setCode(function (InputInterface $input, OutputInterface $output) {
         // get argument id
         $query = $input->getArgument('query');
         $setting = SettingsStorage::getInstance();
         $code = $setting->getById('code');
         $key = $setting->getById('key');
         if (empty($code)) {
             $code = 1;
         } else {
             $code = (int) $code['value'];
         }
         if (empty($key)) {
             $output->writeln("Allegro web api key not set, use 'config key XXXXXX' to configure");
             return;
         } else {
             $key = $key['value'];
         }
         $filters = $input->getOption('filters');
         $api = new AllegroApi($key, $code);
         // returns filters
         foreach (QueryExecutor::getFilters($api, $query, $filters) as $filter) {
             $output->writeln(sprintf("<info>%-30s</info>\t%-30s\n%s\n", "<info>{$filter['name']} " . ($filter['range'] ? '=[min,max]' : '') . "</info>", $filter['description'], implode(', ', array_map(function ($item) {
                 return "{$item['value']} - '{$item['name']}'";
             }, $filter['values']))));
         }
     });
 }
开发者ID:jagusiak,项目名称:allegrowatcher,代码行数:35,代码来源:Console.php

示例12: file_get_contents

<?php

/**
* Arquivo de instalação, deve ser deletado após o uso
*
*/
/**
 * Include do arquivo de configuração
 */
require 'config.php';
/**
 * Criação da tabela e populando o banco
 */
$arquivo = file_get_contents('extras/sql.sql');
$arquivo = explode(';', $arquivo);
foreach ($arquivo as $linha) {
    QueryExecutor::executeSimpleQuery($linha);
}
/**
 * Retorno
 */
echo 'Parabéns! Instalação efetuada com sucesso!<br /><br /><a href="' . blog_url . '">Ir para página inicial</a>';
开发者ID:diogoca,项目名称:blogifpb,代码行数:22,代码来源:instalacao.php

示例13: executeInsert

 public static function executeInsert($sqlQuery)
 {
     QueryExecutor::executeUpdate($sqlQuery);
     return mysqli_insert_id(ConnectionFactory::getConnection());
 }
开发者ID:Cristian93,项目名称:changeManagementKPI,代码行数:5,代码来源:QueryExecutor.class.php

示例14: getFields

function getFields($table)
{
    $sql = 'DESC ' . $table;
    $rettab = array();
    $r = 0;
    $origtab = QueryExecutor::execute(new SqlQuery($sql));
    for ($i = 0; $i < count($origtab); $i++) {
        $fieldname = $origtab[$i][0];
        $row = $origtab[$i];
        switch ($fieldname) {
            case 'rid':
                break;
            case 'is_deleted':
                break;
            case 'create_epoch':
                break;
            case 'delete_epoch':
                break;
            default:
                $rettab[$r++] = $row;
                break;
        }
    }
    return $rettab;
}
开发者ID:hkerem,项目名称:JournaledPHPDAO,代码行数:25,代码来源:generate.php


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