博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
phalcon count统计
阅读量:4684 次
发布时间:2019-06-09

本文共 689 字,大约阅读时间需要 2 分钟。

单表count:

//How many robots are there?$number = Robots::count();echo "There are ", $number, "\n"; //How many mechanical robots are there? $number = Robots::count("type='mechanical'"); echo "There are ", $number, " mechanical robots\n"

 

多表count:

$result = $this->modelsManager->createBuilder()

->columns("SysContractWarn.con_warn_id")
->from("SysCustomer")
->join("SysContract","SysCustomer.cus_id = SysContract.cus_id")
->join("SysContractWarn","SysContract.con_id = SysContractWarn.con_id")
->where($where." AND SysCustomer.serv_status = 0 AND SysContractWarn.rmk_del = 0",array("manId"=>$man->man_id))
->getQuery()
->execute()
->count();

转载于:https://www.cnblogs.com/achengmu/p/5876086.html

你可能感兴趣的文章
hdu-1814(2-sat)
查看>>
谷歌浏览器,添加默认搜索引擎的搜索地址
查看>>
数据结构化与保存
查看>>
转 python新手容易犯的6个错误
查看>>
第四节 -- 列表
查看>>
决策树
查看>>
团队作业
查看>>
如何避免在简单业务逻辑上面的细节上面出错
查看>>
大型网站高并发的架构演变图-摘自网络
查看>>
8丶运行及总结
查看>>
WPF中使用USERCONTROL
查看>>
cache—主存—辅存三级调度模拟
查看>>
Mininet
查看>>
设计模式系列 - 访问者模式
查看>>
eclipse左侧不见
查看>>
python会缓存小的整数和短小的字符
查看>>
格网与四叉树索引
查看>>
多张照片拍摄、图片浏览
查看>>
html(5) css
查看>>
Azure Web连接到Azure MySql Db
查看>>