Hi AljoschaPeters
if you 've done register model manager in app/config/service.php in di and create model table in database
example
app/config/service.php
$di->setShared('modelsManager', function () {
return new Phalcon\Mvc\Model\Manager();
});
app/model/User.php
class User extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
*/
public $user_id;
/**
*
* @var string
*/
public $user_name;
/**
*
* @var string
*/
public $user_pass;
in your controller you can use
class TestController extends ControllerBase
{
public funtion getAction()
{
$phql = "SELECT * FROM User WHERE user_id (1,2,3) ORDER BY user_id(3,2,1)";
$rs = $this->modelsManager->executeQuery($phql);
print_r($rs);
}
for more information https://docs.phalcon.io/en/latest/reference/models.html