php - converted to string database -


) wrote method display contents of database public

function magazyn() {         //return 'magazyn';         $this->magazyn = $this->conn->prepare("select * `products` order `nazwa`");         //$this->magazyn->bind_param('ssss', $id, $nazwa, $kategoria, $sn);         $this->magazyn->execute();         $this->magazyn->store_result();         return $this->magazyn;          if ($this->magazyn->num_rows > 0) {             echo "jest cos w magazynie";         } else {             echo "brak produktw w bazie";         }     }      function __tostring() {         return $this->magazyn;     }  $web = new web(); echo $web->magazyn(); 

and in site have error:

catchable fatal error: object of class mysqli_stmt not converted string in...


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -