hello,
What should I do to show variable from database in virtuemart. I use Virtuemart 2.0.2 and Joomla 2.5.4. I create "_mary" table. I filled two columns by "30" for pole_mary2 and "1" for "pole_mary1". I would like to get variable that contains "30".
I wrote this code:
<?php
$db =& JFactory::getDBO();
$query = "
SELECT ".$db->nameQuote('pole_mary2')."
FROM ".$db->nameQuote('#_mary')."
WHERE ".$db->nameQuote('pole_mary1')." = ".$db->quote('1').";
";
$db->setQuery($query);
$result = $db->loadObject();
?>
<?php echo $result->$pole_mary2 ?>
What I do wrong? Cart work correctly but variable doesn't want to appear.