Advertisement
Guest User

Untitled

a guest
Mar 17th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. class DB
  2. {
  3. function __construct()
  4. {
  5. $this -> host = access :: $host;
  6. $this -> user = access :: $user;
  7. $this -> pass = access :: $pass;
  8.  
  9. $this -> db = access :: $db;
  10. $this -> conn = null;
  11. }
  12.  
  13. function getConnection()
  14. {
  15. $this -> conn = mysqli_connect($this -> host, $this -> user, $this -> pass);
  16. if($this -> conn)
  17. {
  18.  
  19. mysqli_select_db($this -> conn,$this -> db);
  20. return true;
  21. }
  22. else
  23. {
  24. mysqli_error($this -> conn);
  25. return false;
  26. }
  27. }
  28.  
  29.  
  30. public static function mysql_fetch_full_result_array($sql)
  31. {
  32. if(empty($sql)) { return false; }
  33.  
  34. $result = mysqli_query(NEED CONNECTION,$sql);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement