Option for standalone phalcon / mvc / collection function

Hello, I am using phalcon Framework.

I need to make a find, usually I would use different ones, but I did not find an option.

My class is as below:

class Calls extends \Phalcon\Mvc\Collection { public $agent; public $number; public $date; public $status; } 

Do I need to use different date and number fields?

+5
source share
1 answer

you should use the query builder:

The main implementation for the following example:

 $queryBuilder = $this->getDI()->getModelsManager() ->createBuilder() ->addFrom('tableName', 't'); 

Distinctive command: $ QueryBuilder-> various ('t.id');

The column also works, but is not recommended:

 $queryBuilder->columns('DISTINCT(t.id) AS id') 
+1
source

All Articles