0

I'm getting a warning on my game when i make a character and i go through to confirmation i get this error :

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\app\class.engine.php on line 102 Unknown column 'ipaddress_reg' in 'field list

I was wondering what is up with it i visited my localhost/phpmyadmin but nothing worked

Line 100-103 :

final public function num_rows($sql)
{
    return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection));
}
fvu
  • 31,838
  • 5
  • 60
  • 78

1 Answers1

0

The problem is their with your query or your connection. Also check if ipaddress_reg column exists on your subject table.

public function column_exists($table,$field)
{
    $query = mysql_query("SELECT * FROM $table LIMIT 1",$this->connection); 
    $column = mysql_fetch_array($query); 

    return false;

    if(isset($column[$field])) 
    {
        return true;
    }
}

public function is_connected()
{
    if(!$this->connection){ return false; }else{ return true; }
}
johndavedecano
  • 492
  • 5
  • 11
  • Parse error: syntax error, unexpected T_PUBLIC in C:\xampp\htdocs\app\class.engine.php on line 102 Live 102: public function column_exists($table,$field) – user3250830 Jan 29 '14 at 22:51