Exemplo n.º 1
0
 public static function getAssoc($query)
 {
     require_once 'SQLConfig.php';
     $sqlconfig = new SQLConfig();
     $mysqli = $sqlconfig->getMysqli();
     $list = [];
     if ($result = $mysqli->query($query)) {
         while ($row = $result->fetch_assoc()) {
             array_push($list, $row);
         }
         $result->free();
     }
     return $list;
 }