| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 
 | 
<?php
$db=mysql_connect('localhost','root','root') or die("conection errone");
mysql_select_db('glpi',$db) or die("erreur");
$query=("INSERT INTO `affichev` 
SELECT LETTER, SSN, `glpi_computers`.name, date_mod, completename
FROM  `OCSWEB`.`bios` 
INNER JOIN `OCSWEB`.`hardware` ON `OCSWEB`.`bios`.hardware_id
 = `OCSWEB`.`hardware`.ID 
INNER JOIN`OCSWEB`.`ancienhardware` ON `OCSWEB`.`bios`.hardware_id = `OCSWEB`.`ancienhardware`.hardware_id
INNER JOIN `GLPI`.`glpi_computers` ON `OCSWEB`.`bios`.SSN = `GLPI`.`glpi_computers`.serial
INNER JOIN `GLPI`.`glpi_dropdown_locations` ON `GLPI`.`glpi_computers`.location = `GLPI`.`glpi_dropdown_locations`.ID");
 
$result=mysql_query($query) ;
 
$req=mysql_query("select `LETTER`,`SSN`,`name`,`date_mod`,`completename` from affichev");
echo '<table><tr>'
. '<td>LETTER</td>'
. '<td>SSN</td>'
. '<td>name</td>'
. '<td>date_mod:</td>'
. '<td>completename</td></tr>';
while ($resultat = mysql_fetch_array($req))
{
echo  '<tr><td>' . $resultat[LETTER] . '</td>'
. '<td>' . $resultat[SSN] . '</td>'
. '<td>' . $resultat[name] . '</td>'
. '<td>' . $resultat[date_mod] . '</td>'
. '<td>' . $resultat[completename] . '</td></tr>';
 
 
}
echo '</table>';
 
mysql_close();
 
?> | 
Partager