Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- php fatal error uncaught error using $this when not in object context
- $r = $this->db->query($query); // * вот на этой строчке
- $tree = array();
- while ($category = $this->db->fetchObject($r)) {
- // .... тут я работаю с категориями,
- # Execute the query or queries array
- public function query($q)
- {
- if ($this->link) {
- $start = microtime(true);
- $this->res_id = mysqli_query($this->link,$q);
- }
- else {
- $this->error_msg = "Could not execute query to $this->db_name database, wrong database link";
- return 0;
- }
- if (!$this->res_id && $this->exception_on_error) {
- trigger_error("Could not execute query to $this->db_name database, wrong result id", E_USER_ERROR);
- return 0;
- }
- return $this->res_id;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement