内含超强通用权限系统 queryphp发布1.0 beta版,该如何解决

WBOY
Release: 2016-06-13 13:41:26
Original
882 people have browsed it

内含超强通用权限系统 queryphp发布1.0 beta版
目前添加入库验证和修改orm管理方式
ORM Fetch()取得数据后可以提取列 

 /*
  *取得数据结果一列
  *$key要取回的字段key
  *$p表示 true 为数组形式
  * false 为字符组合 $kk为字符间隔
  * $kk 表示 取得当前数组里面的值作为字段key 如果$p为false
  * 表示是间隔
  *$user->getCol('uid',false);array()
  *->fetch()->getCol("uid"); "33,22"
  *$user->getCol("isMar",true,'uid'); $col[$row['uid']]=$row['isMar'];
  */ 

比如 我们取得数据如上面所示
$user->getRecord();如是上图数据

$user->getCol("名字");取得名字一列组成数组
array("0"=>"伍德里",
  "1"=>"张三风",.......)

这样的数组
如果$user->getCol("序号",false);取得一列为字符串组装,注意第二个参数为false,默认为true,返回数组
$str="59,58,57,56.......";这样子,这样子可以使用->WhereIn("uid",$str)查询
如果这样子:$user->getCol("名字",true,"序号");这样取得数组为序号为键,名字为值
array("59"=>"伍德里",
  "58"=>"张三风",
  "57"=>"里斯".......);


csdn不给上图了

可以下载chm手册查看
http://code.google.com/p/queryphp/downloads/list

------解决方案--------------------
帮顶

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!