Re: [SMARTY] Paging - a side note

From: Date: Thu, 12 Dec 2002 22:23:30 +0000
Subject: Re: [SMARTY] Paging - a side note
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6785@lists.php.net to get a copy of this message
We are using it in production. On Thu, 2002-12-12 at 16:25, gawan wrote: > Hei, thats a good news, thank you for the tip. > I did not know that as I am still using version 3.xxx. > Version 4.0+ is still not recommended for production use is it? > This is off topic, but are there people in this forum using version 4+, in > production environment, that is? > > Yrjo > ----- Original Message ----- > From: "Monte Ohrt" <monte@ispi.net> > To: "Yrjö Mäenpää" <yrjo.maenpaa@dlc.fi> > Cc: <smarty-general@lists.php.net> > Sent: Thursday, December 12, 2002 11:17 PM > Subject: Re: [SMARTY] Paging - a side note > > > > For MySQL users, v4.0+ has functions CALC_FOUND_ROWS() and > > SELECT_FOUND_ROWS() that does exactly what you want. But that doesn't > > mean much regarding how it works with a template :-) > > > > mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name > > WHERE id > 100 LIMIT 10; > > mysql> SELECT FOUND_ROWS(); > > > > http://www.mysql.com/doc/en/Miscellaneous_functions.html > > > > Monte > > > > > > On Thu, 2002-12-12 at 13:18, Yrjö Mäenpää wrote: > > > Pagination is indeed an interesting topic. > > > > > > The suggestions I have read all seem to depend on knowing the row count > of the query result. I have a database of about 1.5 million records and i > have to paginate complex search results. If I were to use num_rows or > count(*) first, my searches would far too slow. So I have to use limit (with > offset and rows) and to get only 20 matching record at the time not knowing > how many there will be. > > > > > > If someone (Ben Phillips him self perhaps) would write a plugin to this > kind of a situation, at least I would be very happy (regardles of where the > logic is :) > > > > > > greetings, > > > Yrjo > > -- > > Monte Ohrt <monte@ispi.net> > > > > > > -- > > Smarty General Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Monte Ohrt <monte@ispi.net>

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