We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

backtick

Is it possile to make this work ?

{% for star in title.getCredits().getCast(['order':"order"])%}

ERR: Scanning error before 'order' when parsing: SELECT [Models\Cast].* FROM [Models\Cast] WHERE [credit_id] = :APR0: ORDER BYorder` (85)

sure but the problem is the column order definition {% for star in title.getCredits().getCast(['order':'created_at desc'])%}

good luck

edited Mar '18

sure but the problem is the column order definition {% for star in title.getCredits().getCast(['order':'created_at desc'])%}

good luck

There's a column named "order".

This code works: select * from cast ORDER BY order desc



32.2k
Accepted
answer

"order" not is a reseverd word? in this case you have to use square brackets [] to scape reseverd words like {% for star in title.getCredits().getCast(['order':'[order]'])%} documentation