Getting RSEvents Category from J! database - Joomla! Forum - community, help and support
hi folks,
hoping out there can spot i'm going wrong here... i'm trying grab alias of category event (rsevents) database (in module).
here's code:
it gets called in foreach loop:
i can't life of me query return results .. here's expected 1054 error outputs:
any appreciated
thanks in advance,
waseem
hoping out there can spot i'm going wrong here... i'm trying grab alias of category event (rsevents) database (in module).
here's code:
code: select all
function _getcategoryslug($value) {
// db connection.
$db = jfactory::getdbo();
// create new query object.
$query = $db->getquery(true);
// select articles users have username starts 'a'.
// order created date.
// note putting 'a' second parameter generate `#__content` `a`
$query
->select($db->quotename(array('a.*', 'b.id', 'b.ide')))
->from($db->quotename('#__categories', 'a'))
->join('inner', $db->quotename('#__rseventspro_taxonomy', 'b')
. ' on (' . $db->quotename('a.id') . ' = ' . $db->quotename('b.id') . ')')
->where($db->quotename('b.ide') . ' = '.$db->quote($value));
// reset query using our newly populated query object.
$db->setquery($query);
// load results list of stdclass objects (see later more options on retrieving data).
$results = $db->loadobjectlist();
}
it gets called in foreach loop:
code: select all
<? php echo _getcategoryslug($event->id);?>
i can't life of me query return results .. here's expected 1054 error outputs:
code: select all
unknown column 'a.*' in 'field list' sql=select `a`.`*`,`b`.`id`,`b`.`ide` `somedb_categories` `a` inner join `somedb_rseventspro_taxonomy` `b` on (`a`.`id` = `b`.`id`) `b`.`ide` = '9'
any appreciated

thanks in advance,
waseem
Comments
Post a Comment