MySQL Forums
Forum List  »  Optimizer & Parser

optimize
Posted by: edson fernando
Date: January 17, 2006 02:41PM

how to optimize this script?

$conexao = mysql_connect("localhost","USER","PASS");

$db = mysql_select_db("BD1");

$sql1 = mysql_query("SELECT * FROM chanel WHERE user='$user'");

$db = mysql_select_db("BD2");


while ($row = mysql_fetch_row($sql1)) {

$sql3 = mysql_query("SELECT * FROM music WHERE id='$row[1]'");
$inserir = mysql_fetch_row($sql3);

echo "$inserir[1] - $inserir[2]";
}

mysql_close($conexao);

Options: ReplyQuote


Subject
Views
Written By
Posted
optimize
3125
January 17, 2006 02:41PM
2055
January 17, 2006 06:48PM
2026
January 18, 2006 09:07AM
2019
February 02, 2006 09:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.