Hi I am trying to rebuild my code with mysqli instead of mysql but I have a problem with mysql in a php class:
$db = new mysqli('localhost','user','password','dbname');
require_once('classes/some_class.php');
$some_class = new some_class();
in some_class.php:
 class some_class {
  function __construct() { $db->query('blablabla'); }
 }
This ist not working but:
If I add $db = new ...in some_class.php it works!
So some_class.php don't know the database connection :/
 
     
     
    