hi all,
i want to update one field from one database to another database
my query is
mysql_connect('localhost', 'root', '') ;
mysql_select_db('db1');
mysql_connect('localhost', 'root', '') ;
mysql_select_db('db2');
$query1=mysql_query("select * from db1.tbl_products");
while($fetch=mysql_fetch_assoc($query1)){
echo "update db2.tbl_products set p_price='".$fetch['p_price']."' where p_id='".$fetch['p_id']."'";
echo "<br>";
echo "<br>";
}
in local it is executing correctly but in live error is diplaying
update acess denied for password@db2
any ideas