I am trying to build a kml creator based on google code one.
I have a table called #_huts with 2 records in (fileds are id (INT autoinc), name (VCHAR), description (TEXT with CData in), Lat etc etc
but when I run even the simples query
Warning: Invalid argument supplied for foreach() in /homepages/11/d369608199/htdocs/yrcweb/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(18) : eval()'d code on line 9
Any idea what I'm doing wrong? This same (syntax) code works in other places??
I have a table called #_huts with 2 records in (fileds are id (INT autoinc), name (VCHAR), description (TEXT with CData in), Lat etc etc
but when I run even the simples query
<?php
$db =& JFactory::getDBO();
// Selects all the rows in the markers table.
$query = 'SELECT * FROM `#_huts` WHERE 1';
$db->setQuery($query);
$results=$db->loadObjectList();
foreach ($results as $result):
echo $result->name;
endforeach;
?>
Warning: Invalid argument supplied for foreach() in /homepages/11/d369608199/htdocs/yrcweb/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(18) : eval()'d code on line 9
Any idea what I'm doing wrong? This same (syntax) code works in other places??