mobile_api_calendar

🔧 getEventFromCalendar

Cherche dans la liste des "opportunités" ou "commandes/chantier" si un des objets est lié à un évènement du calendrier
function getEventFromCalendar($id_event) { $id_type_opportunite = 148; $id_type_commande = 168; $att_to_check_opportunite = 'att13'; $att_to_check_commande = 'att40'; $result = array(); $sqlService = new \ToosmarWireframe\Services\SQLService(1, 'ts-machine.eteko.net', 'toosmart', 'i5Hf7MSHKkPN1hy', 'sdx_toosmart_nooa2'); // On cherche une "opportunité" $queryOppotunite = "SELECT * FROM vent_att WHERE id_type = " . $id_type_opportunite . " AND " . $att_to_check_opportunite . " LIKE '%" . $id_event . "%'"; $objet = $sqlService->query($queryOppotunite,true); $record_id = $objet[0]['id_vent']; // ... (truncated)

↩️ Returns

(array) Contenant "opportunité" ou "commande/chantier"