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
3239
January 17, 2006 02:41PM
2133
January 17, 2006 06:48PM
2099
January 18, 2006 09:07AM
2089
February 02, 2006 09:02AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.