phalcon builder 用法
$rawSql = $builder->columns(["aa","bb"])
->from("TableName")
->where("Item1 = 4 AND Item2 = 1")
->getPhql();
$items = $builder->getQuery()->execute();
注意colums和where的不同。
$result = $this->modelsManager->createBuilder()
->columns('aa')
->from('BB')
->where("date='$cc->date' AND ID =" .DD::ID)
->getQuery()
->getSingleResult();
echo $result->aa;
$results = $this->modelsManager->createBuilder()
->columns('aa')
->from('BB')
->where("date='$cc->date' AND ID =" .DD::ID)
->getQuery()
->execute()
->toArray();