Jump to content

angeloghiotto

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by angeloghiotto

  1. class links{ private $mysqli; function __construct(){ $this->mysqli = new mysqli('localhost', 'xxxx', 'xxxx', 'xxxx'); } function foo(){ $this->mysqli->query("BLA BLA BLA"); } function foo2(){ $this->mysqli->query("BLA BLA BLA"); } } Is there a problem to decalre the var mysqli , create a new object and use it for whole class ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.