Commit 752859e04265b3b3443775b6b5a39fb230b5e527
1 parent
c2cd5b76
Exists in
mysqli
Funções estáticas
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
class/db.class.php
@@ -19,13 +19,13 @@ class DB { | @@ -19,13 +19,13 @@ class DB { | ||
19 | return self::$mysqli; | 19 | return self::$mysqli; |
20 | } | 20 | } |
21 | 21 | ||
22 | - public function execQuery($query) { | 22 | + static function execQuery($query) { |
23 | // Resolve o problema da injeção de SQL: | 23 | // Resolve o problema da injeção de SQL: |
24 | - $rs = mysqli_query(DB::conn(), mysqli_real_escape_string(DB::CONN(), $query)); | 24 | + $rs = mysqli_query(self::conn(), mysqli_real_escape_string(self::CONN(), $query)); |
25 | return $rs; | 25 | return $rs; |
26 | } | 26 | } |
27 | 27 | ||
28 | - public function rs_to_array($result, $numass=MYSQL_BOTH) { | 28 | + static function rs_to_array($result, $numass=MYSQL_BOTH) { |
29 | $got = array(); | 29 | $got = array(); |
30 | 30 | ||
31 | if(mysqli_num_rows($result) == 0) | 31 | if(mysqli_num_rows($result) == 0) |