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


PHP Query::add方法代码示例

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


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

示例1: addUser

 public function addUser($conexion, $email, $nombre, $apellido, $edad, $genero, $grado, $password)
 {
     $roll = 3;
     $active = 0;
     $query = new Query();
     $query->add($this->table, $conexion, $email, $nombre, $apellido, $edad, $genero, $grado, $password, $roll, $active);
 }
开发者ID:shikamarucb,项目名称:neuroentrenamiento,代码行数:7,代码来源:usuario.php

示例2: add

 function add($params)
 {
     $game = new Game();
     foreach ($game as $key => $value) {
         if (isset($params[$key])) {
             $game->{$key} = $params[$key];
         }
     }
     $game = Query::add($game);
     return $game;
 }
开发者ID:jocodev1,项目名称:colliermvc,代码行数:11,代码来源:GameController.php

示例3: add

 function add($params)
 {
     $arena = new Arena();
     foreach ($arena as $key => $value) {
         if (isset($params[$key])) {
             $arena->{$key} = $params[$key];
         }
     }
     $arena = Query::add($arena);
     return $arena;
 }
开发者ID:jocodev1,项目名称:colliermvc,代码行数:11,代码来源:ArenaController.php

示例4: add

 function add($params)
 {
     $user = new User();
     foreach ($user as $key => $value) {
         if (isset($params[$key])) {
             $user->{$key} = $params[$key];
         }
     }
     $user = Query::add($user);
     return $user;
 }
开发者ID:jocodev1,项目名称:colliermvc,代码行数:11,代码来源:UserController.php

示例5: Query

    function testGetTablesClauseMultipleTablesWithJoin()
    {
        $q = new Query('Article');
        $q->join('UserCard', 'Article.CardID = UserCard.CardID AND UserCard.UserID = 2', Query::LEFT_JOIN);
        $q->add('UserCard.CardID', null, Query::IS_NULL);
        $q->join('CardPicture');
        $q->group('Article.CardID');
        $q->addOrder('Title', 'DESC');
        $this->assertEquals(preg_replace('/\\s/', '', 'SELECT `Article`.*
FROM (`Article`, `CardPicture`)
LEFT JOIN `UserCard` ON (Article.CardID = UserCard.CardID AND UserCard.UserID = 2)
WHERE `UserCard`.`CardID` IS NULL
GROUP BY `Article`.`CardID`
ORDER BY `Title` DESC'), preg_replace('/\\s/', '', $q->getQuery() . ''));
    }
开发者ID:abcarroll,项目名称:DABL,代码行数:15,代码来源:QueryTest.php

示例6: Query

<?php

//New query
$q = new Query();
$q->add('Column', 'Value');
//Limit results per page
$limit = 50;
//Specify the current page
$page = 2;
//Create instance of pager, provide the name of the DABL class
$pager = new QueryPager($q, $limit, $page, 'Inspection');
//Retrieve an array of Objects from the DABL class for that page
$inspections = $pager->fetchPage();
开发者ID:abcarroll,项目名称:DABL,代码行数:13,代码来源:QueryPager_description_2.php

示例7: getForeignObjectsQuery

 /**
  * @param string $foreign_table
  * @param string $foreign_column
  * @param Query $q
  * @return Query
  */
 protected function getForeignObjectsQuery($foreign_table, $foreign_column, $local_column, Query $q = null)
 {
     $value = $this->{"get{$local_column}"}();
     if (null === $value) {
         throw new RuntimeException('NULL cannot be used to match keys.');
     }
     $column = "{$foreign_table}.{$foreign_column}";
     if ($q) {
         $q = clone $q;
         $alias = $q->getAlias();
         if ($alias && $foreign_table == $q->getTable()) {
             $column = "{$alias}.{$foreign_column}";
         }
     } else {
         $q = new Query();
     }
     $q->add($column, $value);
     return $q;
 }
开发者ID:abcarroll,项目名称:DABL,代码行数:25,代码来源:Model.php


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