Bonjour,

je suis nouveau sur du mysqli (un peu forcé on va dire par flex/flashbuilder)
je suis donc qu'il y à un soucis dans le code suivant,

mais comment faire en sorte qu'il me retourne tous les enregistrement correspondnants au lieu qu'un seul enregistrement ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php public function getServeurByName($string) {
 
    $stmt = mysqli_prepare($this->connection, "SELECT DISTINCT * FROM $this->tablename where GSP_nom=?");
    $this->throwExceptionOnError();
 
    mysqli_stmt_bind_param($stmt, 's', $string);        
    $this->throwExceptionOnError();
 
    mysqli_stmt_execute($stmt);
    $this->throwExceptionOnError();
 
    mysqli_stmt_bind_result($stmt, 
    $row->idServ, 
    $row->timestamp,
      ...........
      ........... 
    $row->email);
 
    if(mysqli_stmt_fetch($stmt)) {
      $row->timestamp = new DateTime($row->timestamp);
      return $row;
    } else {
      return null;
    }
}
merci