CLASSE PHP Warning: mysql_fetch_assoc() expects parameter 1 to be resource

catellostefano

Utente Attivo
19 Dic 2008
525
2
0
www.stepo.biz
Salve,
stò sviluppando una classe di login, ma sono arrivato dinanzi ad un errore, credo banale, mi dice: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, string given in classi/login/PostingLogin.class.inc.php on line 26

ora so che questo errore spunta nel momento che sbaglio la query, ma vi garantisco che è corretta. sotto c'è il codice, vi ringrazio anticipatamente.
ciao


PHP:
		private $IdentificativoPOST;
		private $PasswordPOST;
		private $tokenPOST;

		private $PasswordMd5;
		private $tokenSESSION;

		private $datiDB;
		private $IdentificativoDB;
		private $PasswordDB;

		public function __construct()
			{
				$this->IdentificativoPOST = $_POST['Identificativo'];
				$this->PasswordPOST = $_POST['Password'];
				$this->tokenPOST = $_POST['token'];

				$this->PasswordMd5 = md5($this->PasswordPOST);
				$this->tokenSESSION = $_SESSION['token'];
				
				$this->datiDB = mysql_fetch_array("SELECT * FROM Utenti WHERE Identificativo = '" . $this->IdentificativoPOST . "'");
				
				$this->IdentificativoDB = $this->datiDB['Identificativo'];
				$this->PasswordDB = $this->datiDB['Password'];
			}
 

Discussioni simili