Código: Selecionar todos
$database->setQuery("SELECT imgfilename FROM #__zoomfiles WHERE catid=".$subcat->_id." LIMIT 1");
$this->_result = $database->query();
while ($row = mysql_fetch_object($this->_result)) {
$imagedir = $zoom->_gallery->_dir;
$img = $row->imgfilename;
}
Fatal error: Using $this when not in object context in ...
Alguém sabe como fazer essa mesma consulta em PHP 5?
Ou tem alguma outra forma de exibir a primeira foto da subcategoria ao invês de exibir a figura folder.png ??