If i have two query data with PHP MySQL like this
<?php
$a=msyql_query("select * from users");
while($b=mysql_fetch_array($a,MYSQL_BOTH))
{
$c=$b['username'];
}
$d=msyql_query("select * from new_users");
while($e=mysql_fetch_array($d,MYSQL_BOTH))
{
$f=$e['username'];
}
?>
here is my question i have two table in a database
1- users
2 - new_users
if new_users field data['username'] exists in users table['username'] then update those fields that data retrieved from new_users table.How can i overcome? I think there need to use array but give me some solution experts. just i will attached a picture what i want to do?