數據庫中有兩個數據,一個id為1,一個id為2,用DQL查詢,條件>=1,出來的結果是兩天id為1下面是我的代碼:$repository = $this->getDoctrine()? ? ? ? ? ? ? ? ->getRepository('UserBundle:ShopAdmin');? ? ? ? $query = $repository->createQueryBuilder('p')? ? ? ? ? ? ? ? ->where('p.id >= :id')? ? ? ? ? ? ? ? ->setParameter('id', $id)? ? ? ? ? ? ? ? ->orderBy('p.id', 'ASC')? ? ? ? ? ? ? ? ->getQuery();? ? ? ? $info = $query->getResult();用>沒有問題,但是如果出現Id=0的情況,又出現了兩條id=1的情況有沒大神知道為什么?
- 0 回答
- 0 關注
- 1417 瀏覽
添加回答
舉報
0/150
提交
取消