Jump to content

WHAT AM I DOING WRONG???


Lucky2710

Recommended Posts

$result3 = mysql_query("SELECT User_ID FROM leaderboards WHERE User_ID = '$user'");

if(mysql_num_rows($result3) == 0){

	$query1 = "INSERT INTO leaderboards (User_ID, CollegeFootballPoints) VALUES ('$user','$points')";
	$result1 = mysql_query($query1);

}else{

	$query2 = "UPDATE leaderboards SET  CollegeFootballPoints='$points' WHERE User_ID='$user'";
	$result2 = mysql_query($query2);
}

 

I keep getting this error...'

 

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in update_collegeFBpoints_points.php on line 40

 

And the script is not working!

 

(LINE 40 is

 

$result3 = mysql_query("SELECT User_ID FROM leaderboards WHERE User_ID = '$user'");

if(mysql_num_rows($result3) == 0){

 

specifically mysql_num_rows)

 

 

Link to comment
https://forums.phpfreaks.com/topic/210143-what-am-i-doing-wrong/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.