Hello friends, I am tryong to get result from my database and I want to shoq it random and order by id but it is showing me 404 error page. What should I do not?
Here is my controller function
$hpage = "SELECT * FROM `hpage` ORDER BY `id` DESC";
$this->view->hpagejobs = $this->modelsManager->executeQuery($hpage);
It is not working, and I tried this which is also not working
$hpage = "SELECT * FROM `hpage` ORDER BY `RANDOM ()";
$this->view->hpagejobs = $this->modelsManager->executeQuery($hpage);
Its working only when I do this
$hpage = "SELECT * FROM `hpage`";
$this->view->hpagejobs = $this->modelsManager->executeQuery($hpage);
Then it is working so can anyone tell me what is wrong with query?