On Wednesday 15 July 2009 16:21:22 tedd wrote:
> At 12:38 PM -0700 7/14/09, Miller, Terion wrote:
> >I am trying to make a page that displays a-z like a b c d e etc as links
> >then when you click open one it reloads itself and shows only the query
> >results that go with that letter...i'm not getting it....I get a page that
> >says ARRAY over and over...
> >
> >What I have so far:
>
> -snip-
>
> Why not have MySQL sort the data instead of using php?
>
> For example (from memory -- use with caution)
>
> SELECT name FROM restaurant ORDER BY name DESC LIMIT $offset, 1
>
> Then just change the offset to go up and down the list.
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com

You could do what Tedd suggested, but use MySQL to actually limit the results 
it returns you by using a like clause, i.e. WHERE `somefield` LIKE 'a%'.

*ducks to avoid people throwing things at him. I know it's slow!*

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk

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

Reply via email to