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


PHP Mysql::getLine方法代码示例

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


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

示例1: getUserByProjectId

 public function getUserByProjectId($projectId)
 {
     $mysql = new Mysql();
     $sql = "SELECT GROUP_CONCAT(DISTINCT result.UserId) as Ids ,GROUP_CONCAT(DISTINCT result.name) as Names FROM (SELECT d.UserId,u.Name FROM " . $mysql->dbpre . "developer" . $mysql->debug . " as d ," . $mysql->dbpre . "user" . $mysql->debug . " as u WHERE d.UserId=u.UserId and ProjectId=" . intval($projectId) . " ) as result";
     //echo $sql;
     $result = $mysql->getLine($sql);
     $mysql->closeDb();
     return $result;
 }
开发者ID:xuyintao,项目名称:thindev,代码行数:9,代码来源:Developer.class.php

示例2: getModel

 public function getModel($id)
 {
     $mysql = new Mysql();
     $sql = "SELECT * FROM " . $mysql->dbpre . "project" . $mysql->debug . " WHERE Id=" . intval($id);
     // var_dump( $sql );
     // exit;
     $result = $mysql->getLine($sql);
     $mysql->closeDb();
     return $result;
 }
开发者ID:xuyintao,项目名称:thindev,代码行数:10,代码来源:Project.class.php

示例3: setValue

 function setValue($id)
 {
     $mysql = new Mysql();
     $sqlformat = "select Id,Name,NameUrl,Description,ChildCount,Status,DisplayOrder,ParentId,Property,Image,Belong from  %scategory%s where id=%d and belong=%d";
     $sql = sprintf($sqlformat, $mysql->dbpre, $mysql->debug, intval($id), intval($this->Belong));
     $row = $mysql->getLine($sql);
     $mysql->closeDb();
     $this->Id = $row['Id'];
     $this->Name = $row['Name'];
     $this->NameUrl = $row['NameUrl'];
     $this->ParentId = $row['ParentId'];
     $this->Property = $row['Property'];
     $this->Status = $row['Status'];
     $this->DisplayOrder = $row['DisplayOrder'];
     $this->Description = $row['Description'];
     $this->Image = $row['Image'];
     $this->Belong = $row['Belong'];
 }
开发者ID:xuyintao,项目名称:web01,代码行数:18,代码来源:Category.class.php

示例4: getPost

 function getPost($id, $status)
 {
     $mysql = new Mysql();
     $sql = "SELECT  Id,ChildIds,Belong,Subject,Content,CategoryRoot,Status,DisplayOrder,CategoryIds,CommentStatus,CommentCount,Image,Creator,CreateDate,Tags,DigCount,ViewCount,Summary, CreatorDetail,Property,Source,Link,DisplayDate,Memo,Keywords from " . $mysql->dbpre . "post" . $mysql->debug . " where id=" . intval($id) . " and belong=" . intval($this->Belong);
     if ($status != -1) {
         $sql .= " and Status = " . intval($status);
     }
     $row = $mysql->getLine($sql);
     $mysql->closeDb();
     return $row;
 }
开发者ID:xuyintao,项目名称:web01,代码行数:11,代码来源:Post.class.php

示例5: getUserByLevel

 public function getUserByLevel($deptId, $level)
 {
     $mysql = new Mysql();
     $sql = "SELECT * FROM " . $mysql->dbpre . "user" . $mysql->debug . " WHERE Level=" . intval($level) . " AND Department=" . intval($deptId) . " LIMIT 1";
     // var_dump( $sql );
     // exit;
     $result = $mysql->getLine($sql);
     $mysql->closeDb();
     return $result;
 }
开发者ID:xuyintao,项目名称:thindev,代码行数:10,代码来源:User.class.php


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