Hi All. I am a first time user of Phalcon and I have a question about the Model part of Phalcon.
Consider this query "SELECT userid, firstname, lastname, totalSalesFigure(userid) as sales_figure FROM users "; totalSalesFigure is a stored function on the database.
Is there anyway to load the query in the model USERS itself and reference it like this? $user = Users::findFirst('userid = 3'); // loads the user with userid = 3 echo $user->sales_figure; // outputs the salesFigure of this user.