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

PHP SqlQuery类代码示例

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

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



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

示例1: loadProjectKeywords

 public function loadProjectKeywords($projectId)
 {
     $sql = 'SELECT * FROM keywords WHERE u_p_c_id = ? AND type = 2';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($projectId);
     return $this->getList($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:7,代码来源:KeywordsMySqlExtDAO.class.php


示例2: buscar

 public function buscar($nombre)
 {
     $sql = 'SELECT * FROM apuntes u WHERE titulo like ? and b_borrado=0';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setString('%' . $nombre . '%');
     return $this->getList($sqlQuery);
 }
开发者ID:PhyrionX,项目名称:OPUniversity,代码行数:7,代码来源:ApuntesMySqlExtDAO.class.php


示例3: queryByConfiguracionIdMontoAsc

 public function queryByConfiguracionIdMontoAsc($value)
 {
     $sql = 'SELECT * FROM reglas_cupones WHERE configuracion_id = ? order by monto ASC';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($value);
     return $this->getList($sqlQuery);
 }
开发者ID:randyibarrola,项目名称:active,代码行数:7,代码来源:ReglasCuponesMySqlExtDAO.class.php


示例4: queryByDistribuidorId

 public function queryByDistribuidorId($value)
 {
     $sql = 'SELECT * FROM condicion WHERE usuario_id = ? OR usuario_id IS NULL order by condicion_categoria_id';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($value);
     return $this->getList($sqlQuery);
 }
开发者ID:randyibarrola,项目名称:active,代码行数:7,代码来源:CondicionMySqlExtDAO.class.php


示例5: _supplierCollection

 protected function _supplierCollection($key)
 {
     $sqlQuery = new SqlQuery();
     $sql = "SELECT id, name" . $this->table . "FROM supplier`" . $this->index . "`WHERE" . $key . "\n\n                        LEFT JOIN ( SELECT id_ingredient, id_supplier, MIN(price) FROM has_supplier\n\n                            IF (id=id_supplier){min(price)}";
     $result = $sqlQuery->execute($sql);
     return $result['supplier'];
 }
开发者ID:TitanNano,项目名称:DatenbankenProjekt,代码行数:7,代码来源:Entity.php


示例6: getResponses

 /**
  * Get all records from table
  */
 public function getResponses($challengeId)
 {
     $sql = "SELECT response.*, user.first_name, user.last_name, user.username \r\n\t\t\t\t\tFROM challenge_responses as response JOIN user_info as user\r\n\t\t\t\t\t\tWHERE response.challenge_id = ? AND response.user_id = user.id ORDER BY response.creation_time ASC ;";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($challengeId);
     return $this->getListReponse($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:10,代码来源:ChallengeResponsesMySqlExtDAO.class.php


示例7: load

 public function load($indexList = null, $column = false)
 {
     $sqlQuery = new SqlQuery();
     $column = $column ? $column : $this->index;
     if (isset($indexList)) {
         $indexList = " WHERE " . $column . " IN (" . implode(',', $indexList) . ")" . implode(' AND ', $this->filters);
     } else {
         $indexList = array_reduce($this->filters, function ($prev, $next) {
             return $prev == "" ? " WHERE " . $next : $prev . " AND " . $next;
         }, "");
     }
     if ($this->order) {
         $indexList .= ' ORDER BY `' . $this->orderColumn . '` ' . $this->orderDir;
     }
     if ($this->limit > -1) {
         $indexList .= ' LIMIT ' . $this->limit;
     }
     $sql = "SELECT * FROM " . $this->table . $indexList;
     $result = $sqlQuery->execute($sql);
     if ($result['status']) {
         foreach ($result['data'] as $item) {
             $this->processItem($item);
         }
     }
 }
开发者ID:TitanNano,项目名称:DatenbankenProjekt,代码行数:25,代码来源:Collection.php


示例8: getUserJobPreferredJobLocations

 public function getUserJobPreferredJobLocations($userId)
 {
     $sql = "SELECT * FROM working_locations as locations JOIN user_locations as user_location \r\n\t\t\t\t\tWHERE locations.id = user_location.location_id \r\n\t\t\t\t\t\tAND user_location.user_id = ?";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     return $this->getList($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:7,代码来源:WorkingLocationsMySqlExtDAO.class.php


示例9: queryAllConversation

 /**
  * Get all records from table
  */
 public function queryAllConversation($projectId)
 {
     $sql = 'SELECT * FROM project_responses WHERE project_id = ? AND status = 5';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($projectId);
     return $this->getList($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:10,代码来源:ProjectResponsesMySqlExtDAO.class.php


示例10: updateStatus

 public function updateStatus($id)
 {
     $sql = 'UPDATE user_access_aid SET status=1 WHERE id = ?;';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:7,代码来源:UserAccessAidMySqlExtDAO.class.php


示例11: deleteReminder

 public function deleteReminder($id)
 {
     $sql = 'UPDATE reminders SET status = 2 WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:7,代码来源:RemindersMySqlExtDAO.class.php


示例12: queryInFechas

 function queryInFechas($inicio, $fin, $hotelId)
 {
     $sql = "SELECT DISTINCT * FROM hotel_fechas\n                WHERE hotel_id = ? AND UNIX_TIMESTAMP(fecha) BETWEEN UNIX_TIMESTAMP('{$inicio}') \n                AND UNIX_TIMESTAMP('{$fin}')";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($hotelId);
     return $this->getList($sqlQuery);
 }
开发者ID:randyibarrola,项目名称:active,代码行数:7,代码来源:HotelFechasMySqlExtDAO.class.php


示例13: deleteByFormIdUserId

 public function deleteByFormIdUserId($userId, $formId)
 {
     $sql = 'DELETE FROM teamroom_push_forms.user_forms WHERE user_id = ? AND form_id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     $sqlQuery->setNumber($formId);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:8,代码来源:UserFormsMySqlExtDAO.class.php


示例14: baja

 public function baja($id)
 {
     $sql = 'UPDATE usuarios SET b_borrado = ? WHERE id_usuario = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber("1");
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:PhyrionX,项目名称:OPUniversity,代码行数:8,代码来源:UsuariosMySqlExtDAO.class.php


示例15: updateLastLoginTime

 public function updateLastLoginTime($userId, $timestamp)
 {
     $sql = 'UPDATE user_info SET  last_login_time = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($timestamp);
     $sqlQuery->set($userId);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:8,代码来源:UserInfoMySqlExtDAO.class.php


示例16: deleteUserSkill

 /**
  * Delete record from table
  * @param skill primary key
  */
 public function deleteUserSkill($id, $userId)
 {
     $sql = 'DELETE FROM user_skills WHERE id = ? AND user_id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     $sqlQuery->setNumber($userId);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:12,代码来源:SkillsMySqlExtDAO.class.php


示例17: getUserJobPreference

 public function getUserJobPreference($userId)
 {
     $sql = "SELECT * FROM job_preference WHERE user_id = ?  ORDER BY last_update_on DESC;";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     $jobPreference = $this->getList($sqlQuery);
     return $jobPreference;
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:8,代码来源:JobPreferenceMySqlExtDAO.class.php


示例18: getPushForm

    public function getPushForm($userId)
    {
        $sql = 'SELECT form.* FROM  teamroom_push_forms.forms as form JOIN teamroom_push_forms.user_forms as user_push_form 
					WHERE user_push_form.user_id = ? AND form.id = user_push_form.form_id AND user_push_form.status = 0';
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->setNumber($userId);
        return $this->getRow($sqlQuery);
    }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:8,代码来源:FormsMySqlExtDAO.class.php


示例19: updateSocialLink

 /**
  * Update record in table
  *
  * @param UserSocialLinksMySql userSocialLink
  */
 public function updateSocialLink($userId, $linkUrl, $type)
 {
     $sql = 'UPDATE user_social_links SET link_url = ? WHERE user_id = ? AND type = ? ';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($linkUrl);
     $sqlQuery->setNumber($userId);
     $sqlQuery->set($type);
     return $this->executeUpdate($sqlQuery);
 }
开发者ID:rajnishp,项目名称:teamroomV3,代码行数:14,代码来源:UserSocialLinksMySqlExtDAO.class.php


示例20: queryByHotelIdAndFechas

 public function queryByHotelIdAndFechas($idHotel, $inicio, $fin)
 {
     $sql = 'SELECT * FROM promocion WHERE hotel_id = ?';
     $sql .= ' AND ' . $inicio . ' BETWEEN UNIX_TIMESTAMP(promocion.inicio) AND UNIX_TIMESTAMP(promocion.fin)';
     $sql .= ' AND ' . $fin . ' BETWEEN UNIX_TIMESTAMP(promocion.inicio) AND UNIX_TIMESTAMP(promocion.fin)';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($idHotel);
     return $this->getList($sqlQuery);
 }
开发者ID:randyibarrola,项目名称:active,代码行数:9,代码来源:PromocionMySqlExtDAO.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP SqlUtility类代码示例发布时间:2022-05-23
下一篇:
PHP SqlParser类代码示例发布时间: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