I'am using codeigniter and I'm executing this query
SELECT c.id AS id, c.name AS name, c.img_add AS img, c.downloads as down, c.tag as tag, c.date as date,c.views as view FROM core c WHERE c.name = 'Ganesha (2)' ORDER BY c.downloads DESC
The query is used in the model, and does not returns any data, while the same query when executed in the Heidi SQL, returns me with the appropriate data.
I don't know weather it is a query problem, codeigniter problem or php's, so I'm posting for all.
This is a code which I wrote in my codeigniter model. This may help in answering.
public function getFolderDetail($folder) {
$sql = "SELECT c.id AS `id`, c.name AS `name`, c.img_add AS `img`, c.downloads as `down`, c.tag as `tag`, c.date as `date`,c.views as `view` FROM core c
WHERE c.name = ?
ORDER BY c.downloads DESC";
$params = array($folder);
return $query = $this->db->query($sql,$params);
}