building-complex-db-queries

webcrea 07 May, 2015
Hello,

In this example, where the code must be put ?

http://www.chronoengine.com/faqs/70-cfv5/5231-building-complex-db-queries-using-the-gcore-framework.html

thanks
chris
GreyHead 07 May, 2015
Answer
Hi Chris,

In a Custom Code action somewhere that you want the data.

Bob

PS Personally if you are working in Joomla! I'd find it a lot simpler to use the Joomla! methods e.g.
. .  .
$db = JFactory::getDBO();
$query = "
    SELECT *
        FROM `#__content` AS c
        JOIN `#__users` AS u ON u.`id` = c.`created_by`
        WHERE c.`state` = 1
        ORDER BY c.`id`
        LIMIT 5 ;
";
$db->setQuery($query);
$data = $db->loadAssocList();
. . .
This topic is locked and no more replies can be posted.