Jump to content

Updating table works unreliably.


iainlang

Recommended Posts

When trying to update a table, the following works only occasionally; it doesn't work reliably.  Can anyone show me where I'm going wrong, please?

 

//  $comments_new is the data incoming from the form ;

 

$Query="SELECT comments FROM clients WHERE id='$cli_update_id' ";

$Result=mysql_db_query ($DBName, $Query, $Link);

while ($Row=mysql_fetch_array ($Result))

{

$comments_old=$Row[comments];

}

$comments=$comments_old." <br>".$comments_new;

$Query="UPDATE clients SET comments='$comments' WHERE id='$cli_update_id' ";

$Result=mysql_db_query ($DBName, $Query, $Link);

 

TIA.

Link to comment
https://forums.phpfreaks.com/topic/95575-updating-table-works-unreliably/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.