Re: Best way to increment an integer column in mysql
| From: | Terence | Date: | Thu, 11 Dec 2003 10:38:43 +0000 |
| Subject: | Re: Best way to increment an integer column in mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172453@lists.php.net to get a copy of this message | ||
There's an autoincrement feature for mysql colums, why don't you consider
that?
CREATE TABLE auto_increment (id INT (4) NOT NULL AUTO_INCREMENT, PRIMARY
KEY(id), UNIQUE(id), INDEX(id))
----- Original Message -----
From: "John Clegg" <john.clegg@attglobal.net>
To: <php-general@lists.php.net>
Sent: Thursday, December 11, 2003 6:07 PM
Subject: [PHP] Best way to increment an integer column in mysql
Hi
I was wondering if there is a php / mysql function call that will
increment an integer column in a database.
ie. the equivalent to
$foo++;
Cheers
John Clegg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php