Here is the code
$db = JFactory::getDBO();
$query = "SELECT order_id FROM orders WHERE customer_number = '".$i."' AND created_on = '".$date."'";
$db->setQuery($query);
$rows = $dbz->loadObjectList();
print_r($rows);
The output is
Array ( [0] => stdClass Object ( [virtuemart_order_id] => 549 ) )
I want to get only 549
as output? What is the possible solution.
Note foreach() doesn’t work for me.
try this :
You should probably use another function to load your data. Like:
Check the joomla API documentation to find the right API-calls depending on what you need to do: http://api.joomla.org/cms-2.5/classes/JDatabase.html