# Updating a row in a mysql database

**URL:** <https://forum.kirupa.com/t/updating-a-row-in-a-mysql-database/120627>\
**Category:** Uncategorized\
**Created:** [August 26, 2004, 1:48am UTC](https://forum.kirupa.com/t/updating-a-row-in-a-mysql-database/120627 "2004-08-26T01:48:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [August 26, 2004, 1:48am UTC](https://forum.kirupa.com/t/updating-a-row-in-a-mysql-database/120627/1 "2004-08-26T01:48:11Z")

</div>

Hey All,

I currently have a document that I want to update a certain row in my Mysql Database. First I have cleared certain values, but it ends up deleting all of the posts text, etc…  
$postTXT=$r[‘postTXT’];  
$posterNAME=$r[‘poster’];  
$postTITLE=$r[‘posttitle’];

So I want it to update it according to the message which is automatically generated and is a primary key. It is $msgId which refers to the exact name of the row in the database. To go to the editing page, there is a link which is edit.php/$msgId but it really doesn’t edit the $msgId. Anybody know how to select the right row according to the $msgId ?

-Peter
