Adding to a record

2004-05-25 Thread Daniel Venturini
Hello. Quick easy question I think? I display a INT value to a page (php) by querying mysql. I want to be able for someone to put a new number and add to that record. How would I go about doing this. Would this be a mysql command or a php thing? Thanks in advance.

Re: Adding to a record

2004-05-25 Thread Sarix
, May 25, 2004 7:04 PM Subject: Adding to a record Hello. Quick easy question I think? I display a INT value to a page (php) by querying mysql. I want to be able for someone to put a new number and add to that record. How would I go about doing this. Would this be a mysql command or a php thing

Re: Adding to a record

2004-05-25 Thread Michael Kruckenberg
Seems like you could do it either way: PHP ? $new_num = $mysql_num + $user_num; mysql_query(update table set number = $new_num where . . .) ? or MySQL ? mysql_query(update table set number = number + $user_num where...) ? Depends if you want php or mysql to perform the calculation. Daniel

Looking up duplicate record or adding new unique record

2003-07-23 Thread Phil Bitis
CREATE TABLE tbllayer ( LayerID int(11) NOT NULL default '0', LayerSize int(11) NOT NULL default '0', IceTypeID int(11) NOT NULL default '0', Fingerprint char(16) binary default NULL, PRIMARY KEY (LayerID), UNIQUE KEY Fingerprint (Fingerprint), KEY IceTypeID (IceTypeID) )

UPDATE command, adding to exisiting record

2001-12-28 Thread Todd Williamsen
I am looking to update a record in a table, but take the exsisting value and adding the new value to it... I.e. Exsisting record = 150, new record being inputed = 250 for a total of 400 to be entered into the database. I have looked at the man pages on this but all it gives is static numbers,

RE: UPDATE command, adding to exisiting record

2001-12-28 Thread Chris Bolt
I am looking to update a record in a table, but take the exsisting value and adding the new value to it... I.e. Exsisting record = 150, new record being inputed = 250 for a total of 400 to be entered into the database. UPDATE table SET row = row + 250 WHERE id = #;