1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| static function voirAuth($array_hexa_auth)//array les autorisations que possède le membre{
$query = 'SELECT action FROM info_hexa WHERE valeur_hexa IN (';
$tab = array();
for($i = 0; $i < count($array_hexa_auth); $i++){
$tab[] = '?';
}
$query .= implode(',', $tab) . ')';
$prep = Bdd::getIntance()->prepare($query);
for($i = 0; $i < count($array_hexa_auth); $i++){
//Pour le paramètre PDO tu doit le choisir en fonction de la valeur que tu veut bind
$prep->bindValue(($i+1), $array_hexa_auth[$i], PDO::PARAM_INT);
}
$prep->execute();
//Suite du traitement.
} |
Partager