root / src / pip_history.TSP.php @ d072e29c
Historique | Voir | Annoter | Télécharger (873 octet)
1 |
<?php
|
---|---|
2 |
// a Trigger to display pipet info
|
3 |
$allevents = $this->myQuery("SELECT * FROM ".$this->tb); |
4 |
$allpipets = $this->myQuery("SELECT * FROM pip_stock"); |
5 |
|
6 |
/* there must be a more straightforward way to do this
|
7 |
* but this seems to work
|
8 |
*/
|
9 |
// reach the event displayed
|
10 |
$foundevent = 0; |
11 |
while(!$foundevent && $event = mysql_fetch_object($allevents)){ |
12 |
if ($event->ID == $this->rec) |
13 |
$foundevent = 1; |
14 |
} |
15 |
// record Serial Number of the pipet considered
|
16 |
if ($event){ |
17 |
$SerialNum = $event->Serial_Number ; |
18 |
} |
19 |
|
20 |
// reach the pipet displayed
|
21 |
$foundpipet = 0; |
22 |
while(!$foundpipet && $pipet = mysql_fetch_object($allpipets)){ |
23 |
if ($pipet->Serial_Number == $SerialNum) |
24 |
$foundpipet = 1; |
25 |
} |
26 |
|
27 |
if ($pipet){ |
28 |
// print pipet infos
|
29 |
echo " Pipet : ". |
30 |
$pipet->Marque . " " . |
31 |
$pipet->Type . " " . |
32 |
"<BR>" .
|
33 |
"Serial Number: ".
|
34 |
$pipet->Serial_Number . "<BR>". "<BR>"; |
35 |
} |
36 |
|
37 |
?>
|