Page 1 of 1

Mysqli Erro

Posted: Sat Aug 21, 2010 9:11 pm
by pinehead18
Any thoughts as to why

Code: Select all

	
	function Query($sql)
        {
            $this->Result = mysqli_query($this->link_id,$sql);
            $this->query = $sql;
     
            return $this->Result;
        } 

	function FetchArray() {
		
		$this->Record = mysqli_fetch_array($this->Result,MYSQLI_ASSOC);
		return $this->Record;
	
		}




	$db = new MySQL(); 
	$result = $db->query("SELECT * FROM users WHERE id=1 AND user_id=1");

	while($row = $db->FetchArray($result)) {

		echo "" . $row['chain_id'];
		echo "<br /><br />";
		


causes
Fatal error: Call to undefined method MySQL::Error()

Thanks

Re: Mysqli Erro

Posted: Sat Aug 21, 2010 10:25 pm
by requinix
Congratulations! You gave us code that is (a) incomplete, and (b) has absolutely nothing to do with the error you described.

So beyond
That error means you tried to call a method that doesn't exist.
I don't know what to say.