batman1
New Member
- Messages
- 92
- Reaction score
- 0
- Points
- 0
I am trying to OPTIMIZE my sql queries.
I am having a problem. The EXPLIAN query don't print any thing onto the screen. How does this statement wotk? Is it ENABLED?
See example:
I am having a problem. The EXPLIAN query don't print any thing onto the screen. How does this statement wotk? Is it ENABLED?
See example:
Code:
$result = mysql_query("EXPLAIN SELECT * FROM buxscript_members WHERE username = '$uname' OR username = '$ref' OR email = '$email' OR alertpay = '$ap' OR paypal = '$pp' OR register_email = '$email' OR register_alertpay = '$ap' OR register_paypal = '$pp' OR register_ip = '$user_ip'");
while($row = mysql_fetch_array($result))
{
// Referral exists
if($row["username"]==$ref && strlen($ref)>2)
$ref_check = true;
else
{
if($row["username"]==$uname){
// username already exists
$error = "Username already registered.";
break;
}
}
}