The following aims at showing
- the next future event a memebr is attending to but is
- not hosting the event (have not themselves entered the event in the calendar)
at the memper.php profile page
The major critical data is pulled from
roll field which is created as a part of the
event attendace mod. The data entries looks like
- a:2:{i:34;s:7:"test018";i:1;s:5:"MikaK";}
- a:1:{i:1;s:5:"MikaK";}
- a:1:{i:60;s:5:"kfied";}
The code I'm thinking of using look like this
PHP Code:
$eventattend = $DB_site->query = ("SELECT eventid , userid , title , customfields , dateline_from , roll
FROM " . TABLE_PREFIX . "event
WHERE roll LIKE '%i:" . $userinfo['userid'] . ";s:" . strlen($userinfo['userid']) . ":%'
AND dateline_from > UNIX_TIMESTAMP()
AND userid != '$userinfo[userid]'
ORDER BY dateline_from ASC
LIMIT 1");
while($eventsatt = $DB_site->fetch_array($eventattend))
{
exec_switch_bg();
$eventsatt['date'] = vbdate($vboptions['dateformat'],$eventsatt['dateline_from']);
eval('$attendevents .= "' . fetch_template('memberinfo_attendedevents') . '";');
}
the bits template is
memberinfo_attendedevents and the
$attendevents variable iserting the bits goes into memberinfo template.
What do you think is wrong with the code? It doesn?t give any sql errors, but the bits teplate doesn?t appear uncached (i haven?t added it to the templates cache on purpose just yet) and the bits area at the member info page stay blanco despite I have entered test attendances...
I just don't get why
Thanks for any thoughts!
-Mika