[SOLVED]How to update database by a raw sql?

Dear experts,

I want to execute raw simple query like:

UPDATE comments SET sort_order = :order: WHERE id = :id:

How to do that in Phalcon?

PS: I try to avoid PHQL because I read that it will do select first then update (2 round database trips)




$this->db->query("UPDATE comments SET sortorder = ? WHERE id = ? ", array($sortorder, $comment_id));

Tested it and it doesn't select table schema before update.

@Andrey It works. Thanks.