I have my own modular system and would say that on a scale of 1 - 10 in PHP coding I'm atleast an 8 - not the best, but good enough to practically anything I want with it. Anyways, again I have my own modular system - templating from the database, languages seperated from the html, and all that good stuff.
Anyways, look at my coding - you'll be able to figure out what's going on obviously if you know your stuff, but basically I can't get it to show more than one row in the database. I've used this same coding elsewhere in the site and it works wonderfully, there's a bug somewhere that I just can't smoosh - could you help?
function get_list() {
$user = $this->user['user_id'];
$notification_count_t = $this->db->query("SELECT COUNT(*) FROM hw_notifications WHERE no_userid=$user");
$notification_count = mysql_result($notification_count_t, 0);
if ($notification_count) {
$notification_t = $this->db->query('SELECT * FROM hw_notifications WHERE no_userid="'.$user.'" ORDER BY no_id ASC LIMIT 0, 10');
$notification = $this->db->nqfetch($notification_t);
while ($notifications = $notification) {
return eval($this->template('NOTIFICATIONS_MINILIST'));
}
} else {
return eval($this->template('NOTIFICATIONS_NONE'));
}
}