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
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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, De
> 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
3 matches
Mail list logo