Im having a little problem replacing specific values. Im using the REPLACE command but I cant use the WHERE clause. Im not sure how to tell which col and which row to replace the specific value in.. Unless Im not supposed to use the REPLACE command and are supposed to use something else. I tried googling replacing values in a mysql database and thats what I got..
Thanks in advance.
Value replacement
Moderator: General Moderators
use UPDATE
ie:
ie:
Code: Select all
<?php
$sql = "UPDATE table_name SET field_name='$var' WHERE cond=cond";
mysql_query($sql);
?>