SHARE
TWEET

Select Client Banners if Exists banner for this client

uzielweb Dec 19th, 2017 (edited) 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $db = JFactory::getDbo();
  2. $query = $db->getQuery(true);
  3. $query->select('a.*');
  4. $query->from($db->quoteName('#__banner_clients', 'a'))
  5.     ->join('INNER', $db->quoteName('#__banners', 'b') . ' ON (' . $db->quoteName('b.cid') . ' = ' . $db->quoteName('a.id') . ')')
  6.     ->order($db->quoteName('a.name') . 'ASC');
  7. $db->setQuery($query);
  8. $results = $db->loadObjectList();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top