0
MySQL的使用Entity Manager從表格中選擇列的最大值的最簡單最簡單的方法是什麼?
select max(PARAM_DATE) from access_param;
ZF2
$em = $this->getEntityManager();
$pp = $em->createQuery("select max(pdate) as date1 from Access\Entity\Param B");
$user2 = $pp->getResult();
$q =$em->createQuery"selectB.pdate,B.userid,B.pdate,B.password,B.uppercase,B.useridspecial,B.number from Access\Entity\Param B where B.pdate='".$user2."' ");
$user1 = $q->getResult();
初學者有用似乎是第一個? –
[Semantical Error] line 0,col 11 near'pdate)as date1':Error:'pdate'is not defined.I m getting error: – bhuko