Re: creating a link....
| From: | Aaron Abelard | Date: | Fri, 25 Aug 2000 16:49:35 +0000 |
| Subject: | Re: creating a link.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13692@lists.php.net to get a copy of this message | ||
Something like this: (untested)
if($offset == "") {
$offset = 0;
}
$query = "select * from table1 where (var >= '$var1' ";
$query.= "&& var <= '$var2') order by $var3 desc limit $offset,400";
...
echo "<a href=\"$PHP_SELF?offset=400\">Next 400</a>\n";
Quoting Michael Roark (rhuian@mail.greycouncil.org):
> how would i turn the following query(contained in bleh.php) into a link
>
> $sql="select * from table1 where (var >= '$var1' && var <=
> '$var2') order by $var3 desc limit 400";
>
> I want to build a next 400 at the bottem of the page so I need to be able
> to call bleh.php from a link and change the limit bit of the sql
> statement.
>
>
> Thanks,
>
> Michael
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
aaron / aig4.com