<?php
$result = $fiz['db']->query("SELECT wallpost_from FROM {$fiz['db_prefix']}status WHERE user = ".$_SESSION['fiz_user']." AND wallpost = 1 AND notificated = 0;");
if($result->rowCount() != 0)
{
while($wallpost = $result->fetchObject());
{
$profile = fizGetProfile($wallpost->wallpost_from);
out('
<div id="question">
'.sprintf(NOTIFICATION_WALLPOST, $profile->firstname." ".$profile->lastname).'
</div>
');
}
}
?>
Dit geeft
Notice: Trying to get property of non-object in E:\xampp\htdocs\fizlounge\templates\fizlounge\notifications.template.php on line 47
Terwijl
<?php
$result = $fiz['db']->query("SELECT wallpost_from FROM {$fiz['db_prefix']}status WHERE user = ".$_SESSION['fiz_user']." AND wallpost = 1 AND notificated = 0;");
if($result->rowCount() != 0)
{
$wallpost = $result->fetchObject();
$profile = fizGetProfile($wallpost->wallpost_from);
out('
<div id="question">
'.sprintf(NOTIFICATION_WALLPOST, $profile->firstname." ".$profile->lastname).'
</div>
');
}
?>
Gewoon doet wat ik wil, alleen werkt dat maar 1 keer, ik kan er niet achter komen wat ik fout doe...
Misschien jullie wel?