D
D
devilsD2016-09-09 16:38:35
PostgreSQL
devilsD, 2016-09-09 16:38:35

How to fix Twig_Error_Runtime error in Yii?

There is a site on yii1, with twig template engine, database - PostgreSQL. The site previously worked successfully on the old server. After transfer it gives an error:

An exception has been thrown during the rendering of a template ("CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "and"
LINE 3: WHERE customer.visible AND customer.contest_id = and (selec...
^. The SQL statement executed was: SELECT customer.customer_id, count(vote.customer_id) as votes
FROM pr_contest_customer customer LEFT JOIN pr_contest_vote vote ON (vote.customer_id = customer.customer_id)
WHERE customer.visible AND customer.contest_id = and (select id from pr_customer_image image where customer.customer_id = image.customer_id limit 1) is not null
GROUP BY "vote"."customer_id", "customer"."customer_id", "customer"."date_added"
ORDER BY "votes" DESC LIMIT 6") in "/views/site/contest.twig" at line 60.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evnuh, 2016-09-09
@evnuh

I will work as a Chukchi reader for you:
AND customer.contest_id = and

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question