Ignore:
Timestamp:
Jun 3, 2006 7:47:48 PM (18 years ago)
Author:
scdev
Message:

Q - Merged branches/2.0singleton into trunk. Completed updating classes to use singleton methods. Implemented tests. Fixed some bugs. Changed some interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/validation.cli.php

    r111 r136  
    1717
    1818// Get DB tables.
    19 $qid = DB::query("SHOW TABLES");
     19$qid = $db->query("SHOW TABLES");
    2020while (list($row) = mysql_fetch_row($qid)) {
    2121    $tables[] = $row;
     
    2424// Make sure requested table is in database.
    2525if (!in_array($db_tbl, $tables)) {
    26     die(sprintf("%s Warning: %s does not exist in database %s. Please select one of: \n\n%s\n\n", basename($_SERVER['argv'][0]), $db_tbl, App::getParam('db_name'), join("\n", $tables)));
     26    die(sprintf("%s Warning: %s does not exist in database %s. Please select one of: \n\n%s\n\n", basename($_SERVER['argv'][0]), $db_tbl, $app->getParam('db_name'), join("\n", $tables)));
    2727}
    2828
    2929// Get DB table column info.
    30 $qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));
     30$qid = $db->query("DESCRIBE " . $db->escapeString($db_tbl));
    3131while ($row = mysql_fetch_row($qid)) {
    3232    $cols[] = $row;
     
    277277// natsort($o);
    278278
     279// Remove last empty element.
     280if ('' == end($o)) {
     281    array_pop($o);
     282}
     283
    279284echo "function validateInput()
    280285{
    281286    global \$fv;
    282287
    283     ";
    284 echo join("\n    ", $o);
    285 echo "
     288    " . join("\n    ", $o) . "
    286289}";
    287290?>
Note: See TracChangeset for help on using the changeset viewer.