IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 9, 2025, 9:11:12 AM (14 months ago)
Author:
eugene
Message:

add example to use PDO database access methods

Location:
trunk/ippMonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor

  • trunk/ippMonitor/raw/ipp.php

    r42794 r42834  
    100100  // define the DSN strings. NOTE: PDO uses a different format from DB or MDB2
    101101  if ($database == $CZARDBNAME) {
    102     $dsn_pdo = "mysql:host=$DBHOST;dbname=$database";
     102    $dsn_pdo = "mysql:host=$CZARDBHOST;dbname=$database"; // note this is case sensitive
    103103    $dsn = "mysql://$DBUSER:$DBPASS@$CZARDBHOST/$database";
    104104    $dsnerr = "mysql://$DBUSER:XXX@$CZARDBHOST/$database"; // only used to report the error
    105105  } else {
    106     $dsn_pdo = "mysql:host=$CZARDBHOST;dbname=$database"; // note this is case sensitive
     106    $dsn_pdo = "mysql:host=$DBHOST;dbname=$database";
    107107    $dsn = "mysql://$DBUSER:$DBPASS@$DBHOST/$database";
    108108    $dsnerr = "mysql://$DBUSER:XXX@$DBHOST/$database"; // only used to report the error
Note: See TracChangeset for help on using the changeset viewer.