use UPDATE
Also, be sure to learn basic SQL before use: http://www.w3schools.com/sql/ http://www.sqlcourse.com/ http://www.onlamp.com/pub/ct/19 Regards, Philip On Sun, 6 Jul 2003, Kevin Fradkin wrote: > hi... > i have this secuence to insert data to my db > > mysql_query > ("INSERT INTO my_table( > number,name,surname > ) > values ('$number','$name','$surname' > )"); > > i want to ask what do i have to do if i want to modify instead of insert > when this data already exists... > for example.. i have in my_table > number name surname > 1 jhon smith > > and i want to change the name...jhon --> john > > and if that not exist create it... > number name surname > 0 mary duke > 1 charles emmerson > > and add john's one.. ( to check if i can use only modify to add ) > > thnx!.. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php