© 1999-2048 dssz.net 粤ICP备11031372号
[其它] Symfony查询方法实例小结
说明:本文实例讲述了Symfony查询方法。分享给大家供大家参考,具体如下: 1. createQuery的写法 $sql = 'SELECT COUNT(DISTINCT(g.goodsId)) FROM AppBundle:GoodsIndex g WHERE g.status = :status'; $params = array( 'status' => GoodsIndex::STATUS_NORMAL, ); if (!empty($keywords)) { $params['<weixin_38619967> 上传 | 大小:41kb