Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Query per selezionare i record dalla tabella corso
- $sql = $conn->prepare("SELECT id_corso, corso FROM corso WHERE id_gruppo = ? ORDER BY id_corso");
- $sql->bind_param("i", $id_gruppo);
- $sql->execute();
- $result = $sql->get_result();
- $conn->close();
- // Controllo se ci sono risultati
- if ($result && $result->num_rows > 0) {
- while ($row = $result->fetch_array()) {
- $json[] = $row;
- }
- } else if ($result === false) {
- error_return_json_error(ERR_DATABASE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement