Displaying results either side of an Query?
| From: | Joseph H Blythe | Date: | Thu, 12 Oct 2000 03:17:43 +0000 |
| Subject: | Displaying results either side of an Query? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19745@lists.php.net to get a copy of this message | ||
Hey all,
I got a bit of a tricky problem, I need to be able to find a result in a
mysql table and then dispaly this result in the middle of a predefined
number of results for example:
15 results
*My Query*
15 results
Now I have tried a few things but I can't seem to work out how to do
this, I need to be able to find the row number of My Query, then count
back 15 use this as the start point with a offset of 15 then add 1 to My
Queries placment with a limit of 15. Then I would have to combine all
this together in a while loop to spit it all out in a html table.
Has anyone ever tried this sort of thing before, as this sort of method
would at least need 3 queries. Is there a better way? How do I find out
a rows place in a query?
Any help would be greatly appreciated if anyone can make sense if this.
Regards
Joseph