Forums

not showing anything

tnijman 05 Jan, 2009
The following code displays nothing

<?php
$db = JFactory::getDBO();
$query = "SELECT naam, datum, cf_id FROM `jos_feesten` WHERE 1";
$db->setQuery($query);
$rows = $db->loadObjectList();
echo $db->getErrorMsg();
?>
<select id="feest_id" name="feest_id">
<?php
foreach($rows AS $row) {
echo '<option value="'.$row->cf_id.'">'.$row->naam $row->datum.'</option>';
}
?>
</select>


but this one does:

<?php
$db = JFactory::getDBO();
$query = "SELECT naam, datum, cf_id FROM `jos_feesten` WHERE 1";
$db->setQuery($query);
$rows = $db->loadObjectList();
echo $db->getErrorMsg();
foreach($rows AS $row) {
echo "$row->naam, $row->datum" ;
}
?>


Can someone tell me what is wrong?

Thank you!
Max_admin 05 Jan, 2009
$row->naam $row->datum


should be

$row->naam.$row->datum


Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 06 Jan, 2009
Hi tnijman,

. . . or
$row->naam.' '.$row->datum
if you want a space between them.

Good catch Max!!

Bob
Max_admin 06 Jan, 2009
Thanks 😀
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tnijman 06 Jan, 2009
Thanks you guys! You are great. I love your components!
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger