I don't know what is the problem but following working SQL query doesn't work with PhalconPHP;
SELECT p.id AS id, p.image AS image, p.title AS title, p.status AS status, c.name AS category, c.id AS category_id FROM posts AS p INNER JOIN categories AS c ON c.id = p.category_id WHERE p.deleted = :deleted AND (p.title LIKE :search_0 OR c.name LIKE :search_1) ORDER BY id DESC LIMIT :APL0 OFFSET :APL1
Here is the rest of the data
["bind"]=>
array(4) {
["deleted"]=>
int(0)
["search_0"]=>
string(7) "%fast %"
["APL0"]=>
int(10)
["APL1"]=>
int(0)
}
["bindTypes"]=>
array(4) {
["deleted"]=>
int(1)
["search_0"]=>
int(2)
["APL0"]=>
int(1)
["APL1"]=>
int(1)
}
I got this information from Phalcon's query builder ->getQuery()->getSQL();
When I replace placeholders with their respected values and run the query, it works as expected. Unfortunately when I run ->getQuery()->execute();
I'm getting 404 error.
Could anyone tell me where am I doing wrong please?