How do I simultaneously update rows of data in a database?
Should I Update it one by one? Or is there any other way to do it?
Should I Update it one by one? Or is there any other way to do it?
Code:
$query = mysql_query("UPDATE tblProducts SET prod_code='$prod_code1'");
if($query)
{
$query2 = mysql_query("UPDATE tblProducts SET prod_code='$prod_code2'");
if($query2)
{
echo "update success!";
}
}
Comment