Re: [PHP] in_array()/finding page Problem

2003-10-23 Thread Marek Kilimajer
Ben G. McCullough wrote: I agree - my solution is VERY resource intensive, but I think I may have over simplified my question. Each item is listed by two categories, $medium and $period. Users can get to the item via a 'browse' of either category. I want to user to be able to get back to the

Re: [PHP] in_array()/finding page Problem

2003-10-23 Thread Marek Kilimajer
You solution is quite resource expensive. I would do: [find $maxpages] SELECT COUNT(*)/12 FROM table WHERE id <= $real_id; list($maxpages) = fetch_row() In result.php use "ORDER BY id" Ben G. McCullough wrote: I think I have a flaw of logic in trying to find the correct page in a mutli-page sql

[PHP] in_array()/finding page Problem

2003-10-23 Thread Ben G. McCullough
I think I have a flaw of logic in trying to find the correct page in a mutli-page sql result. Goal - find the correct page [results.php?page=x] when linking from another page. Current method - loop through a pagination function looking for the matching $id in an array [simplified for illustrat