0

I am analyzing a code and I receive the next error
Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\AktiveKB\admin\includes\classes\class.auth.php on line 175
I am new in php and I don't know how to handle this error

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by eduard77
0

Sorry guys. I've just being tired

function SetupHomePageLinks()
		{
			$arrPermissions = $GLOBALS["AKB_CLASS_AUTH"]->GetPermissions();

			// Get the number of user submitted questions
			$GLOBALS["NumSubmittedQuestions"] = mysql_result(mysql_query(sprintf("select count(pk_squestId) from %ssubmittedquestions", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of pending comments
			$GLOBALS["NumPendingComments"] = mysql_result(mysql_query(sprintf("select count(pk_commentId) from %scomments where cStatus='pending'", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of questions
			$GLOBALS["NumQuestions"] = mysql_result(mysql_query(sprintf("select count(pk_questId) from %squestions", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of visible questions
			$GLOBALS["NumVisibleQuestions"] = mysql_result(mysql_query(sprintf("select count(pk_questId) from %squestions where qVisible=1", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of visible questions
			$GLOBALS["NumHiddenQuestions"] = mysql_result(mysql_query(sprintf("select count(pk_questId) from %squestions where qVisible=0", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of comments
			$GLOBALS["NumComments"] = mysql_result(mysql_query(sprintf("select count(pk_commentId) from %scomments", $GLOBALS["tablePrefix"])), 0, 0);

			// Get the number of pending comments
			$GLOBALS["NumPendingComments"] = mysql_result(mysql_query(sprintf("select count(pk_commentId) from %scomments where cStatus='pending'", $GLOBALS["tablePrefix"])), 0, 0);
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.