Re: [SMARTY] Problem with (unlimited) amounts of data IN an array

From: Date: Sun, 11 Aug 2002 06:52:32 +0000
Subject: Re: [SMARTY] Problem with (unlimited) amounts of data IN an array
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5647@lists.php.net to get a copy of this message
I'd offer something like this....its a little heavy due to the redundant data on the join but it does solve the issue: "select * from omg_leaguelist left join omg_wars using(league_id) left join omg_clanlist using(clan_id) order by league_name" This brings in all your data for each league into one array you can iterate cleanly. while ($row = $db->fetch_array($res)) { $data[$row['league_id']][] = $row; } $t->assign('data', $data); Then loop the array within the template.... foreach $leagueid { echo 'League stuff'; foreach $data[$league_id] { echo 'War stuff for each league'; } } Bob Silva ----- Original Message ----- From: "Peter Billen" <peter@clueless.be> To: <smarty-general@lists.php.net> Sent: Saturday, August 10, 2002 2:46 PM Subject: [SMARTY] Problem with (unlimited) amounts of data IN an array > Hi, > > I got this error: > <smarty-general@lists.php.net>: > ezmlm-reject: fatal: Sorry, I don't accept messages larger than 30000 > bytes (#5.2.3) > > So I uploaded my question. You can find it here: > http://www.clueless.be/arrays.htm > > Thanks, > > Peter >

« previous php.smarty.general (#5647) next »