Hi there,
I'm new to Phalcon and am just playing around with the framework trying to understand it better. I've run into an issue which seems like something ridiculously simple but I havent been able to figure it out. See the code below. Any idea why the one piece of code would work but the other wouldnt?
Thanks so much for any help!
$order = "views desc";
//This doesn't work - results are not sorted
$phql = "SELECT * FROM Posts ORDER BY :ord: limit 10";
$videos = $app->modelsManager->executeQuery($phql, array(
'ord' => $order
));
//This works! Results are sorted as expected
$phql = "SELECT * FROM Video ORDER BY " . $order . " limit 10";
$videos = $app->modelsManager->executeQuery($phql);