RE: [PHP-DB] adding integer to field in query

2003-08-14 Thread Dillon, John
: [PHP-DB] adding integer to field in query Dillon, John mailto:[EMAIL PROTECTED] wrote on Wednesday, August 13, 2003 10:24 AM: How do you add a number to a field within the query, ie without having to extract? Eg $query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID

RE: [PHP-DB] adding integer to field in query

2003-08-14 Thread Matt Schroebel
Dillon, John mailto:[EMAIL PROTECTED] wrote on Wednesday, August 13, 2003 10:24 AM: How do you add a number to a field within the query, ie without having to extract? Eg $query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID'; is the above visits=(visits+1) legal, cos it doesn't

Re: [PHP-DB] adding integer to field in query

2003-08-14 Thread CPT John W. Holmes
From: Dillon, John [EMAIL PROTECTED] Thanks to both responses. In fact, it decided to work once I put 0 in the cell that 1 was to be added to! It seems it got it started.. 1+NULL=? 1 + NULL = NULL Any math statement with NULLs in it will equal NULL. (DB wise) ---John Holmes... -- PHP

[PHP-DB] adding integer to field in query

2003-08-14 Thread Dillon, John
How do you add a number to a field within the query, ie without having to extract? Eg $query=UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID'; is the above visits=(visits+1) legal, cos it doesn't work at the moment? Thanks, John