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/def/autocode.php

    r34014 r39498  
    2626
    2727// define restrictions to the queries
     28$WHERE = "";
    2829// ** TABLE RESTRICTIONS **
    2930
     
    4041
    4142// get the result table count
    42 if ($MODE == "basic") {
     43if ("$MODE" == "basic") {
    4344  $sql = "SELECT count(*) FROM $TABLE $WHERE";
    4445}
    45 if ($MODE == "summary") {
     46if ("$MODE" == "summary") {
    4647  $sql = "SELECT count(*) FROM (SELECT $FIELDS FROM $TABLE $WHERE) as TEMP";
    4748}
     
    5354  menu_end();
    5455}
    55 if (!$qry->fetchInto($row)) {
     56if (!dbFetchInto($qry, $row)) {
    5657  echo "<b>error reading $TABLE table count</b><br>\n";
    5758  echo "<br><small><b> count query : $sql </b></small><br>\n";
     
    7879
    7980// query the database
    80 if ($MODE == "basic") {
     81if ("$MODE" == "basic") {
    8182  $sql = "SELECT $FIELDS FROM $TABLE $WHERE LIMIT $dTABLE OFFSET $rowStart";
    8283}
    83 if ($MODE == "summary") {
     84if ("$MODE" == "summary") {
    8485  $sql = "SELECT $FIELDS FROM $TABLE $WHERE LIMIT $dTABLE OFFSET $rowStart";
    8586}
     
    9495// ** HEAD CODE **
    9596
     97$buttonLink = "";
    9698// ** BUTTON RESTRICTIONS **
    9799navigate_buttons ($rowStart, $rowLast, $dTABLE, $rowTotal, $buttonLink, $ID, '$FILE');
     
    113115
    114116// list the results
    115 while ($qry->fetchInto($row)) {
     117while (dbFetchInto($qry, $row)) {
    116118  // $link = "$FILE" . "?expID=" . $row[0] . "&" . $ID['link'];
    117119
Note: See TracChangeset for help on using the changeset viewer.