RE: [PHP] Math: Adding DB numbers to PHP script number
| From: | John W. Holmes | Date: | Wed, 11 Jun 2003 10:57:19 +0000 |
| Subject: | RE: [PHP] Math: Adding DB numbers to PHP script number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151042@lists.php.net to get a copy of this message | ||
> I'm trying to add a number from my database ($id) and add it to a
number
> (1)
> so that the link with http://xxxxx/index.php?id=#(+1) (no +1
> this is
just
> example) has a the right id number not the one before it.
> But I'm stuck on the problem where the
> http://xxxxx/index.php?id=0 not
the
> latest id number.
> Any help is appreciated
$next_number = $id + 1;
$link = "http://xxxxxx/index.php?id=$next_number";
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/