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_exposures.php

    r38258 r39498  
    7474
    7575    $qry = $db->query($sql);
    76     $qry->fetchInto($count);
     76  dbFetchInto($qry, $count);
    7777
    7878    if ($surveyStr == "") $surveyText = "all surveys";
     
    154154
    155155    // loop through results in order to make html table
    156     while ($qry->fetchInto($row)) {
     156    while (dbFetchInto($qry, $row)) {
    157157
    158158        $exp_id = $row[0];
     
    257257    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    258258
    259     while ($qry->fetchInto($row)) {
     259    while (dbFetchInto($qry, $row)) {
    260260
    261261        if ($row[2] > 0) $hash[$row[0]] = "Y";
     
    287287    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    288288
    289     while ($qry->fetchInto($row)) {
     289    while (dbFetchInto($qry, $row)) {
    290290
    291291        if ($row[2] > 0) $hash[$row[0]] = "Y";
     
    318318    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    319319
    320     while ($qry->fetchInto($row)) {
     320    while (dbFetchInto($qry, $row)) {
    321321
    322322        if ($row[2] > 0) $hash[$row[0]] = "Y";
     
    350350    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    351351
    352     while ($qry->fetchInto($row)) {
     352    while (dbFetchInto($qry, $row)) {
    353353
    354354        if ($row[2] > 0) $hash[$row[0]] = $row[2];
     
    380380    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    381381
    382     while ($qry->fetchInto($row)) {
     382    while (dbFetchInto($qry, $row)) {
    383383
    384384        if ($row[2] > 0) $hash[$row[0]] = $row[2];
     
    408408    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    409409
    410     while ($qry->fetchInto($row)) {
     410    while (dbFetchInto($qry, $row)) {
    411411
    412412        if ($row[2] > 0) {
     
    444444    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    445445
    446     while ($qry->fetchInto($row)) {
     446    while (dbFetchInto($qry, $row)) {
    447447
    448448        if ($row[2] > 0) $hash[$row[0]] = $row[2];
     
    475475    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    476476
    477     while ($qry->fetchInto($row)) {
     477    while (dbFetchInto($qry, $row)) {
    478478
    479479        if ($row[2] > 0) $hash[$row[0]] = $row[2];
     
    505505    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    506506
    507     while ($qry->fetchInto($row)) {
     507    while (dbFetchInto($qry, $row)) {
    508508
    509509        $hash[$row[0]] = $row[1];
     
    536536    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    537537
    538     while ($qry->fetchInto($row)) {
     538    while (dbFetchInto($qry, $row)) {
    539539
    540540        if ($row[2] > 0) $hash[$row[0]] = $row[2];
     
    566566    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
    567567    $hash = array();
    568     while ($qry->fetchInto($row)) {
     568    while (dbFetchInto($qry, $row)) {
    569569
    570570        if ($row[2] == 2) $hash1[$row[0]] = $row[1];
Note: See TracChangeset for help on using the changeset viewer.