Page 1 of 1

updating mysql d/b

Posted: Thu Mar 11, 2004 7:49 am
by nnikunjj
i am new to php programming. i am using mysql as databse and php as frontend. i want to replace values in database from the php scipt.
the database has four fields-- sno,date,start,end..
similarly the php page has to hav three fields ..date,enter start,enter end...whn i execute the php script the values should be updated in the corresponding row... please help me out with the code..

thanks in advance
Nikunj

Posted: Thu Mar 11, 2004 8:07 am
by Joe
If your new to it all the I recommend visiting http://www.php.net and reading up on php in general and http://www.mysql.com to read up on SQL. For the task you want to complete you will need to make a db connection and use an Update mySQL query. The update should go like:

UPDATE table SET originalvalue = 'Newvalue' WHERE dbfield = '???'

Regards


Joe 8)