I need to update a database based on another database. I can already run the php code to make the update file, but I have to remove an 'or' option at the end. This is what i have:
<?php
require("db_info.php");
$db=@mysql_connect("$host", "$dbuser", "$dbpass");
@mysql_select_db("$dbname");
echo("update phpbb_users set user_active=\"0\" where");
$result=@mysql_query("SELECT * FROM members WHERE disable=1 ORDER BY rank DESC, myname");
while($row=@mysql_fetch_array($result))
echo(" username=\"$row[myname]\" or ");
?>
I realize that i'd have to open the other database up, but I'm not sure if I have to close the first db's connection before i open the second database up.