Re: Re[2]: displaying data from database
| From: | Andrei Zmievski | Date: | Fri, 02 Nov 2001 21:46:04 +0000 |
| Subject: | Re: Re[2]: displaying data from database | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1826@lists.php.net to get a copy of this message | ||
On Fri, 02 Nov 2001, Alexander Plakidin wrote:
> Well, now I see that I have no alternatives to retrieving entire data which I need to be
> displayed to an array of hash arrays.
>
> I was just thinking if there is another way, like I did in FastTemplate - fetching data
> row by row and adding rows to output. Somewhy I don't like fetching all data to memory at
> once, I will perform some research of how can it reflect on performance.
Is there a big problem with fetching only the data that will be
displayed on the page, if the results are paginated?
You can still use the FastTemplate-like way of doing this: for each row
assign the data, manually fetch the template, append the results to a
variable, then assign the variable to outer template.
-Andrei
"This isn't right. This isn't even wrong."
-- Wolfgang Pauli