Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public function ultimosGrupos($limite){
  2. try {
  3. $query = "SELECT * FROM groups ORDER BY id ASC LIMIT :limite";
  4. $this->Select = $this->Conn->prepare($query);
  5. $this->Select->bindParam(':limite' , $limite, PDO::PARAM_INT);
  6. $this->Select->execute();
  7. if($this->Select->rowCount() > 0){
  8. return $this->Select->fetchAll(PDO::FETCH_ASSOC);
  9. }else{
  10. return FALSE;
  11. }
  12. } catch (PDOException $exc) {
  13. exibeMensagens("Erro ao consultar. {$exc->getMessage()}", WS_ERROR);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement