Error mysql_num_rows() expects parameter 1 to be resource
Scris: Vin Aug 10, 2012
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\inc\pages.php on line 1050
Linia 1050= if(mysql_num_rows($result) == 1)
Nu inteleg unde e problema.
Stima
Cod: Selectaţi tot
if($lvl>=3) {
$sql="SELECT * FROM users WHERE sef='".$your_nickname."' ";
$result=mysql_query($sql);
if(mysql_num_rows($result) == 1)
{ echo 'ai deja un clan '; } else {
?>
<div style="position:absolute;top:400px;left:570px"><form method=post action="">
Numele breslei: <input type=text name=nume_breasla><br>
<input type=submit name=submit><br></form>
<? if(isset($_POST['nume_breasla'])) { $nume_clan=$_POST['nume_breasla'];
$result = mysql_query("UPDATE clans SET sef='$your_nickname' , nume_clan='$nume_clan'")
or die(mysql_error());
}
}
}
Nu inteleg unde e problema.
Stima