Re: RE: RE: RE: RE: AW: [SMARTY] Paging

From: Date: Mon, 16 Dec 2002 07:11:03 +0000
Subject: Re: RE: RE: RE: RE: AW: [SMARTY] Paging
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6817@lists.php.net to get a copy of this message
For me, SQL queries doen't take any noticable time at all. So I don't need to paginate the queries but it's enough to paginate the returned array. For this I have implemented a small plugin which truncates a sql result array. So the SQL logic is still separated from the display logic. MySQL is really fast and in most cases you need to optimize your source code and not the database queries so this is a good compromise for me ;) If anybody has interest in the code I can post it here. Cheers, André "Rasmus Schultz" <m@mindplay.dk> schrieb im Newsbeitrag news:php.smarty.general-6759@news.php.net... > >> By submitting a query for it? i.e. mypage.php?perpage=20, or > >> by creating a form with a "perpage" field ... this way, any > >> safety and defaults you implement for your arguments, for the > >> end user, shield the designer from the mechanics as well ... > > > >but this would allow the end user to change the settings as well, which > >could be an unwanted feature. > > > >the designer is hidden from the mechanics, all they have to do is put > >one line of smarty code to call the plugin. then they loop through the > >results as if they had been set by the php programmer. what else do they > >need shielding from? > > {return_paged_results query="delete * from customer"} > > >

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