| 1234567891011121314151617181920212223 |
- <?php
- db::query("SELECT "
- . "" . DB_T_SALARIES . ".id, "
- . "" . DB_T_SALARIES . ".loginId, "
- . "" . DB_T_SALARIES . ".nom, "
- . "" . DB_T_SALARIES . ".prenom, "
- . "" . DB_T_SALARIES . ".sexe, "
- . "" . DB_T_SALARIES . ".contrat, "
- . "" . DB_T_SALARIES . ".lieu, "
- . "" . DB_T_SALARIES . ".actif, "
- . "IF(" . DB_T_EVENTS_INSCRITS . ".id_salarie IS NOT NULL, 1, 0) AS inscrit, "
- . "" . DB_T_EVENTS_INSCRITS . ".present "
- . "FROM " . DB_T_SALARIES . " "
- . "LEFT JOIN " . DB_T_EVENTS_INSCRITS . " ON " . DB_T_SALARIES . ".id = " . DB_T_EVENTS_INSCRITS . ".id_salarie "
- . "AND " . DB_T_EVENTS_INSCRITS . ".id_evenement = " . core::getGet("id"));
- $row = db::resultset();
- if (!empty($row)) {
- echo json_encode($row);
- exit();
- } else {
- exit();
- }
|