Dobrý deň potreboval by som poradit vyhadzuje mi to chybu
: mysql_num_rows() expects parameter 1 to be resource, boolean given in
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "tuxtest";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$pname = $user->GetPlayerSummaries($_COOKIE['steamID'])->personaname; //STEAM PROFILE NAME
$pid = $user->GetPlayerSummaries($_COOKIE['steamID'])->steamid; //STEAM ID 64
$result = mysql_query("SELECT UserID FROM info WHERE UserID='$pid'");
if(mysql_num_rows($result) > 0) {
mysql_query("UPDATE info SET UserID = '$pid', UserName ='$pname'");
}
else
{
mysql_query("INSERT INTO info(UserID, UserName) VALUES ('$pid','$pname') ");
}
mysqli_close($conn);
Ďakujem za pomoc