Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function GetAllUtilisateurByFiltres($donnees = NULL) {
- $where = "WHERE ";
- $array = array();
- foreach($donnees as $key => $value){
- if(!empty($value)){
- $value = addslashes($value);
- $where .= $key . " = ? AND ";
- $array[] = "$value";
- }
- }
- $where = substr($where, 0, -5);
- $sql = "SELECT * FROM vls_users " . $where;
- $sth = $this->connexion->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
- $sth->execute($array);
- $tab = $sth->fetchAll(PDO::FETCH_OBJ);
- return $tab;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement