Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format
PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:php_connexion_mysql [08/07/2021 16:53] Hypathie [Objet PDO] |
utilisateurs:hypathie:tutos:php_connexion_mysql [08/07/2021 16:55] Hypathie [Objet PDO] |
||
---|---|---|---|
Ligne 271: | Ligne 271: | ||
} | } | ||
- | public function getNomfromId($id) | + | public function getNomfromId($id) |
- | { | + | { |
- | $q = "SELECT name FROM users where id=" . $id . ";"; | + | $q = "SELECT name FROM users where id=" . $id . ";"; |
- | $result = $this->gestionPDO->securConnexion()->query($q)->fetch(); | + | $result = $this->gestionPDO->securConnexion()->query($q)->fetch(); |
- | //ou | + | //ou |
- | //$result = $this->gestionPDO->queryFetch($q); | + | //$result = $this->gestionPDO->queryFetch($q); |
- | return $result; | + | return $result; |
- | } | + | } |
- | + | ||
- | + | ||
- | //public function getDataTreeCountryStateCity() | + | |
- | //{ | + | |
- | // $query = "SELECT name FROM tree_country_state_city where id=1;"; | + | |
- | // $result = $this->data_tree_connexion->query($query)->fetch(); | + | |
- | // return $result; | + | |
- | + | ||
- | + | ||
- | //while($row = $result->fetch_array()) | + | |
- | //{ | + | |
- | // $sub_data["id"] = $row["id"]; | + | |
- | /// $sub_data["name"] = $row["name"]; | + | |
- | // $sub_data["text"] = $row["name"]; | + | |
- | // $sub_data["parent_id"] = $row["parent_id"]; | + | |
- | // $data[] = $sub_data; | + | |
- | //} | + | |
- | + | ||
- | //echo json_encode($data); | + | |
- | //} | + | |
} | } | ||
</code> | </code> |