Subversion Repositories computer_asset_manager_v1

Rev

Rev 81 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81 Rev 90
Line 89... Line 89...
89
   foreach ( $attributes as $key => $value ) {
89
   foreach ( $attributes as $key => $value ) {
90
      print "insert into attrib( name,added_date ) select $key, now() from dual where not exists (select * from attrib where name = $key);\n";
90
      print "insert into attrib( name,added_date ) select $key, now() from dual where not exists (select * from attrib where name = $key);\n";
91
   }
91
   }
92
   // our actual load
92
   // our actual load
93
   print implode( "\n", $sql ) . "\n";
93
   print implode( "\n", $sql ) . "\n";
-
 
94
   print "select
-
 
95
   attrib.name attrib_name,
-
 
96
   device_attrib.value value,
-
 
97
   device_attrib.added_date,
-
 
98
   device.device_id,
-
 
99
   attrib.attrib_id,
-
 
100
   device_attrib_id
-
 
101
from
-
 
102
   device_attrib
-
 
103
   join attrib using (attrib_id)
-
 
104
   join device using (device_id)
-
 
105
where
-
 
106
   device.name = $device
-
 
107
order by
-
 
108
   attrib.name;
-
 
109
"
94
 
110
 
95
 
111
 
96
?>
112
?>