Witam, zainstalowałem sobie skrypt - instalacja przebiegła poprawnie, lecz na stronie logowania występuje poniższy błąd.
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/bovtek/ftp/classes/mysql.class.php on line
75Oto kod pliku mysql.class.php<?php
/**************************************************************************
* XXXXXX
* XXXXX
* Wszystkie prawa zastrzeżone
*
* Autor skryptu:
* XXXXXX
**************************************************************************/
function __construct()
{
if (class_exists('Error')) {
include "error.class.php";
$error = new Error();
}
if(defined("DEBUG")): $error->mysql(1000
); endif; endif;
mysql_query("CREATE DATABASE ".SQL_NAME
); if(defined("DEBUG")): $error->mysql(1001
); endif; endif;
if(defined("DEBUG")): $error->mysql(1002
); endif; endif;
}
/**
* Zapytanie: $sql->sqlQuery
* @return
*/
function sqlQuery($select)
{
if($this->debug==true): echo $select; endif; if($this->query):
else:
endif;
}
/**
* Zapytanie: $sql->sqlExec
* @return
*/
function sqlExec($select, $table, $option)
{
$this->db = NULL;
$this->query = mysql_query("SELECT ".$select." FROM ".$table." ".$option); if($this->query):
else:
endif;
else:
return $this->db;
endif;
}
function sqlRow($select, $table, $option)
{
$this->query = mysql_query("SELECT ".$select." FROM `".$table."` ".$option); return $this->row;
}
function sqlInsert($table,$values)
{
if($this->query = mysql_query("INSERT INTO $table VALUES($values)")): return true;
else:
return false;
endif;
}
function sqlDelete($table,$where)
{
$this->query = mysql_query("DELETE FROM $table WHERE $where"); }
function sqlUpdate($table,$values,$where)
{
if(!isset($table)): die('class.mysql.php : nie podano wymaganych parametrów'); endif; if(!isset($values)): die('class.mysql.php : nie podano wymaganych parametrów'); endif; if(!isset($where)): die('class.mysql.php : nie podano wymaganych parametrów'); endif;
$this->query = mysql_query("UPDATE $table SET $values WHERE $where LIMIT 1");
return true;
}
/**
* Sprawdzanie czy wybrany rekord znajduje się w bazie danych
* @param object $table - nazwa tabeli
* @param object $where - warunek where
* @return true lub false
*/
function sqlCheck($table, $where)
{
$this->query = mysql_query("SELECT * FROM $table WHERE $where");
if($this->numrows==0):
return false;
elseif($this->numrows>0):
return true;
endif;
}
function sqlGetLastId($table, $id)
{
$this->query = mysql_query("SELECT * FROM ".$table." ORDER BY ".$id." DESC"); return $this->row;
}
function sqlCount($table, $where=null)
{
else:
$query = mysql_query("SELECT * FROM ".$table." WHERE ".$where); endif;
return $this->row;
else:
return 0;
endif;
}
public function generateIdent( $length )
{
$pw = 0;
for($i=0;$i<$length;$i++) {
case 1:
break; //0-9
case 2:
break; //A-Z
case 3:
break; //a-z
endswitch;
}
return $pw;
}
/* function __destruct()
{
$error = new Error();
if(!@mysql_close($this->sqlIdent)):
if(defined("DEBUG")): $error->mysql(1003); endif;
endif;
} */
}
?>
Proszę o rozwiązanie mojego problemu