IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2016, 6:26:07 AM (10 years ago)
Author:
eugene
Message:

fix MDB2 DBI methods; avoid php warnings by putting quotes around hash arguments; check for hash element existence before using; simplify code with get_htmlkey_value function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_labels.php

    r38719 r39498  
    313313
    314314    // list the results
    315     while ($qry->fetchInto($row)) {
     315    while (dbFetchInto($qry, $row)) {
    316316
    317317        echo "<tr>";
     
    358358
    359359    // list the results
    360     while ($qry->fetchInto($expType)) {
     360    while (dbFetchInto($qry, $expType)) {
    361361
    362362        $sql = "SELECT COUNT(*) FROM summitExp WHERE dateobs > '$date' AND exp_type = '$expType[0]'";
    363363        $qry2 = $projectdb->query($sql);
    364         $qry2->fetchInto($summit);
     364      dbFetchInto($qry2, $summit);
    365365        $sql = "SELECT COUNT(*) FROM summitExp JOIN rawExp ON summitExp.exp_name = rawExp.exp_name WHERE summitExp.dateobs > '$date' AND summitExp.exp_type = '$expType[0]'";
    366366        $qry2 = $projectdb->query($sql);
    367         $qry2->fetchInto($mhpcc);
     367      dbFetchInto($qry2, $mhpcc);
    368368
    369369        echo "<tr>";
     
    397397    $qry = $db->query($sql);
    398398    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    399     while ($qry->fetchInto($row)) {
     399    while (dbFetchInto($qry, $row)) {
    400400
    401401        $labels[] = $row[0];
     
    621621    $qry = $db->query($sql);
    622622    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    623     $qry->fetchInto($row);
     623    dbFetchInto($qry, $row);
    624624
    625625    return $row[0];
     
    655655    $qry = $db->query($sql);
    656656    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    657     $qry->fetchInto($row);
     657    dbFetchInto($qry, $row);
    658658
    659659    return $row[0];
     
    673673    $qry = $db->query($sql);
    674674    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    675     $qry->fetchInto($row);
     675    dbFetchInto($qry, $row);
    676676
    677677    $pending = $row[0];
     
    730730    $dates = "";
    731731    $firstIn = true;
    732     while ($qry->fetchInto($row)) {
     732    while (dbFetchInto($qry, $row)) {
    733733
    734734        if ($firstIn) {
     
    887887    $qry = $db->query($sql);
    888888    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    889     $qry->fetchInto($row);
     889    dbFetchInto($qry, $row);
    890890
    891891    $alive = $row[0];
     
    906906    $qry = $db->query($sql);
    907907    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    908     $qry->fetchInto($row);
     908    dbFetchInto($qry, $row);
    909909
    910910    return $row[0];
     
    947947    }
    948948    $res = $dbRepl->query('SHOW SLAVE STATUS');
    949     while ($res->fetchInto($row)) {
     949    while (dbFetchInto($res, $row)) {
    950950        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
    951951        $errorStatusInMySql = $row[18];
Note: See TracChangeset for help on using the changeset viewer.