PDA

Zobacz pełną wersję : Warning: mysql_num_rows() expects parameter 1



redemers
02-02-2013, 11:01
Pojawił mi się cyklicznie taki oto błąd na stronie głównej katalogu:


Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in/home/efdcpl/public_html/fdc/libraries/joomla/database/database/mysql.php on line 344

Nie bardzo wiem jak ma to "ugryźć". Cy to moze być wina serwera na którym znajduje się moja strona ?

A o to ten fragment kodu:




/**
* Description
*
* @access public
* @return int The number of rows returned from the most recent query.
*/
function getNumRows( $cur=null )
{
return mysql_num_rows( $cur ? $cur : $this->_cursor );
}


/**
* This method loads the first field of the first row returned by the query.
*
* @access public
* @return The value returned in the query or null if the query failed.
*/

palyga007
02-02-2013, 12:08
1. Wyłącz wyświetlanie błędów na serwerze. Takich rzeczy nie powinno pokazywać się "na świat"
2. Komunikat pojawia się zapewne dlatego że zapytanie zwraca pusty wynik. Ciężko bez linku bezpośredniego coś więcej powiedzieć. Może masz niewypełniony jakiś parametr tego komponentu etc.