Hello everybody,
I want to use this SQL Query :
SELECT DISTINCT name,picture FROM Bar AS b INNER JOIN Beer AS be ON b.id = be.idBar AND be.day = :day;
in my application :
$bars = $app->modelsManager->executeQuery($phql, array( 'day' => $day ));
But I get this error:
Uncaught exception 'Phalcon\Mvc\Model\Exception' with message 'Syntax error, unexpected token COLON, near to 'day;', when parsing: SELECT DISTINCT name,picture FROM Bar AS b INNER JOIN Beer AS be ON b.id = be.idBar AND be.day = :day;
Does anybody has an idea what the problem could be?
Bruno