Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

can I use _name from sql option list? 13.11.2014 22:23

I have created a multi option list using an sql query and successfully used the value in a calculation for price of my product
I would like to use the option key or name in the description and as far as I can tell from the Quick Guide this should be available as $myvar_name however this is does not produce anything?

Is the _name functionality available for an sql generated list?

Many Thanks
Simon

Re: can I use _name from sql option list? 14.11.2014 09:41

Hello,

Option List from sql query is a special feature of option list, and _name suffix is not available. You should get value as $myvar. You could write a query in code to get other value from your table, like this:

$db =JFactory::getDBO();
$query="select OTHER_VALUE from #__MYTABLE where ID=".$myvar;
$db->setQuery($query);
$result=$db->loadResult();
$newvalue=$result->OTHER_VALUE;

Regards,

Edited by MSTeam - 14.11.2014 09:46
Moonsoft Team
www.moonsoft.es

Re: can I use _name from sql option list? 17.11.2014 21:36

OK - I already have the query obviously from making the list.
thanks
Simon
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback