Hey, leute ich hänge hier grade wo sehr Fest.
Und zwar habe ich eine klasse für mysql gemacht aber, ich kriege bei einer num_rows abfrage immer einen error.
PHP
public function query($query_link){
$this->query_link = $query_link;
$this->query_run = $this->connection->query($this->query_link);
return $this->query_run;
}
public function get_rows($query_num){
$this->query_num = $query_num;
$this->query_run = $this->connection->query($this->query_num);
return $this->query_run->num_rows;
}
Alles anzeigen
Und ich kriege immer diesen Error: Notice: Trying to get property of non-object in C:\xampp\htdocs\userpanel\class\database.php on line 39
Query: $connection->get_rows("SELECT * FROM kunden-book WHERE Username = '$username' AND Password = '$password'")