Re: Imposing a range on what is stored in a session variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 27, 2009 at 10:54 AM, Miller,
Terion<tmiller@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>
>
> =====snipped====
>>
>
> I would page the data with the LIMIT call as Jim suggested. What is
> the user doing with 1K records and how are they getting 1K records?
>
> --
>
> Bastien
>
> Cat, the other other white meat
>
>
> Here is a link to the code at PasteBin
>
> It's a db full of the town's restaurant inspections that users can look at to see what places have violations etc
>
> http://pastebin.ca/1504393
>


So this is a report that is being run on the data at any particular
moment in time. Is there criteria that can be used to limit the data
range for more efficient queries like:
1. must be in a certain neighborhood or zip code

You should look at paging the data here with the OFFSET portion of the
limit clause

Select * from restaurant [where clause]limit 1000, $offset

where the $offset value can tell you where to start in the 17K rows of
data so that in effect you show records 1-1000, 1001-2000,
2001-3000...then on the page, just provide a set of links of navigate
the recordset by the user  [ << < 1-1000 1001-2000 2001-3000 > >> ]


-- 

Bastien

Cat, the other other white meat

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux