edit a row

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

edit a row

Post by Sevengraff »

Ok, i want to edit a specific fileld in a MySQL, how would i go about doing that in a PHP script?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

take a look at http://www.mysql.com/doc/en/UPDATE.html and http://www.mysql.com/doc/en/REPLACE.html

e.g.

Code: Select all

$query = "UPDATE members SET status='ill' WHERE id=".$memberId;
mysql_query($query, $dbConn);
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

wow you reply fast! thanks for the example, it helped. stuff is working like it should! wooo
Post Reply