Monday 16 January 2012

Using Joomla's DBO

After using the tutorial for making a component one thing it doesn't go into is coming off the beaten track when it comes to database calls. Here's a page that I've found pretty help full.

http://docs.joomla.org/Category:JDatabase

What I'm trying to do is get a list of products from virtuemart.

$db = JFactory::getDBO();
$query = "SELECT * FROM #__example2";
$db->setQuery($query);
$db->query();
$rows = $db->loadRowList();


to be continued ...

No comments: