Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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



27.3k
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