updating mysql d/b

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nnikunjj
Forum Newbie
Posts: 2
Joined: Thu Mar 11, 2004 7:49 am

updating mysql d/b

Post 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
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post 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)
Post Reply