On Wednesday 30 January 2002 09:48, [EMAIL PROTECTED] wrote:
> Hello,
> I have this query:
>       if ($cat){
>              $result = mysql_query("SELECT * FROM table WHERE $cat=1",$db);
>               if ($myrow = mysql_fetch_array($result)); {
>       do {
> I use a link on the menu to call this query(<a href=browse.php?cat=food>)
> This returns a large result set that I would like to span accross multiple
> pages.
> I've gotten this off this list and used it with success on other pages:
>         if ( ! ISSET($loc) ) { $loc=0; $next=1; }
>              elseif( $next == 1 ) {$loc +=50;}
>              else ($loc -= 50;}
>              If ($loc < 0 ) {$loc = 0;}
> with links like this(<A href=\"browse.php?loc=$loc&next=0\">Previous</A>";
>                               A
> href=\"browse.php?loc=$loc&next=1\">Next</A>";)
>
> How could I combine these operations?

Have you tried:

  <a href="browse.php?loc=$loc&next=1&cat=food">Next</a>


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
A kiss is a course of procedure, cunningly devised, for the mutual
stoppage of speech at a moment when words are superfluous.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to