Advertisement
Guest User

Untitled

a guest
Oct 29th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1.     public function select($sql, $array = [], $fetchMode = PDO::FETCH_ASSOC)
  2.     {
  3.         $sth = $this->prepare($sql);
  4.  
  5.         foreach ($array as $key => $value) {
  6.  
  7.             $sth->bindValue("$key", $value);
  8.         }
  9.  
  10.         $sth->execute();
  11.  
  12.         return $sth->fetchAll($fetchMode);
  13.  
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement