PHP script with query on DB2 -


i have portion of script:

//agent d4 offline events last 24h   $q_d4_offline_last24h = "select distinct node, lastoccurrence, inps_close_timestamp reporter.reporter_status alertkey = 'm_sw_mid_mon_ser_sts_006c_all' , nodealias '%:d4' , lastoccurrence > date(current_date -1 days)";       $db2_reporter_conn = new ldbproxy();     if(!$db2_reporter_conn->connect_db2("192.168.8.245:50001", "reporter", "itmuser", "tivoli")) die ('e:connessione al db2 fallita:' . $db2_reporter_conn->errormsg);     $connettore = $db2_reporter_conn->query($q_d4_offline_last24h) or die("e:errore nella query: " . $db2_reporter_conn->errormsg);      while($row = $db2_reporter_conn->fetch($connettore)){               if(!isset($offline[$row['node']])){                     $offline[$row['node']] = array();             }             $offline[$row['node']]["data inizio: " . substr($row['lastoccurrence'],0,-2)] = '';              if($row['inps_close_timestamp'] == '1970-01-01 01:00:00.0')                     $offline[$row['node']]["data fine: n/a"] = '';             else                     $offline[$row['node']]["data fine: " . substr($row['inps_close_timestamp'],0,-2)] = '';           print_r($offline);      } 

as output, (i put print_r of $offline variable):

array (     [l168] => array         (             [data inizio: 2016-11-07 20:45:20] =>             [data fine: 2016-11-07 20:54:24] =>         )  ) array (     [l168] => array         (             [data inizio: 2016-11-07 20:45:20] =>             [data fine: 2016-11-07 20:54:24] =>             [data inizio: 2016-11-08 02:18:20] =>             [data fine: 2016-11-08 02:21:25] =>         ) 

i don't understand because if query directly on database result this:

node    lastoccurrence        inps_close_timestamp j168    2016-11-07 20:45:20   2016-11-07 20:54:24 l168    2016-11-07 20:45:20   2016-11-07 20:54:24 l168    2016-11-08 02:18:20   2016-11-08 02:21:25 

why l168 rather j168 , l168?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -