You are not logged in.
Pages: 1
heu voilà, il y a une requette que je ne comprend pas tout à fait, dans glpi/glpi/computers/functions et c'est dans la fct "showComputerList"
A quoi servent toutes les jointures, on ne récupère pas les device dans le select, on ne cherche pas non plus n ordi avec des périphériques internes précis,est-ce qu'on peut m'expliquer, je sui stombé làdessus en chechant si il y aavait une fonction qui faisait le lien entre un ordi et ses périphériques. merci!
La Requête:
$query = "select DISTINCT comp.ID from glpi_computers as comp LEFT JOIN glpi_computer_device as gcdev ON (comp.ID = gcdev.FK_computers) ";
$query.= " LEFT JOIN glpi_device_moboard as moboard ON (moboard.ID = gcdev.FK_device AND gcdev.device_type = '".MOBOARD_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_processor as processor ON (processor.ID = gcdev.FK_device AND gcdev.device_type = '".PROCESSOR_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_gfxcard as gfxcard ON (gfxcard.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".GFX_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_hdd as hdd ON (hdd.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".HDD_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_iface as iface ON (iface.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".NETWORK_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_ram as ram ON (ram.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".RAM_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_sndcard as sndcard ON (sndcard.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".SND_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_drive as drive ON (drive.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".DRIVE_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_control as control ON (control.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".CONTROL_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_pci as pci ON (pci.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".PCI_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_case as Tcase ON (Tcase.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".CASE_DEVICE."') ";
$query.= " LEFT JOIN glpi_device_power as power ON (power.ID = gcdev.FK_DEVICE AND gcdev.device_type = '".POWER_DEVICE."') ";
$query.= " LEFT JOIN glpi_networking_ports on (comp.ID = glpi_networking_ports.on_device AND0 glpi_networking_ports.device_type='1') ";
$query.= " LEFT JOIN glpi_dropdown_netpoint on (glpi_dropdown_netpoint.ID = glpi_networking_ports.netpoint) ";
$query.= " LEFT JOIN glpi_dropdown_os on (glpi_dropdown_os.ID = comp.os) ";
$query.= " LEFT JOIN glpi_dropdown_locations on (glpi_dropdown_locations.ID = comp.location) ";
$query.= " LEFT JOIN glpi_enterprises ON (glpi_enterprises.ID = comp.FK_glpi_enterprise ) ";
$query.= " LEFT JOIN glpi_users as resptech ON (resptech.ID = comp.tech_num ) ";
$query.= " LEFT JOIN glpi_type_computers ON (glpi_type_computers.ID = comp.type ) ";
$query.= getInfocomSearchToRequest("comp",COMPUTER_TYPE);
$query.= getContractSearchToRequest("comp",COMPUTER_TYPE);
$query .= " where $where AND comp.deleted='$deleted' AND comp.is_template = '0' ORDER BY $sort $order";
Offline
Elles servent dans le cas ou on effectue une recherche sur les periphériques.
l'element de clause $where doit les utiliser.
MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI : Support Contribute References Freshmeat
Offline
ok merci.
Offline
bonsoir, ou on peut trouvé la requête insert pour l'insertion des données dans une table?
Offline
Pages: 1