John -
...and then John Clegg said...
%
% 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++;
I didn't see that, but you can at least let mysql do the math:
update tablename set field = field + 1
IL PROTECTED]>
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
--
> 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++;
>
Hi John
Well you can specify the column as auto_increment to let MySQL handle the
incrementation else I suppose - mysql_query('update mytable set
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
4 matches
Mail list logo