Changeset 136 for trunk/bin/module_maker/validation.cli.php
- Timestamp:
- Jun 3, 2006 7:47:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/validation.cli.php
r111 r136 17 17 18 18 // Get DB tables. 19 $qid = DB::query("SHOW TABLES");19 $qid = $db->query("SHOW TABLES"); 20 20 while (list($row) = mysql_fetch_row($qid)) { 21 21 $tables[] = $row; … … 24 24 // Make sure requested table is in database. 25 25 if (!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))); 27 27 } 28 28 29 29 // Get DB table column info. 30 $qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));30 $qid = $db->query("DESCRIBE " . $db->escapeString($db_tbl)); 31 31 while ($row = mysql_fetch_row($qid)) { 32 32 $cols[] = $row; … … 277 277 // natsort($o); 278 278 279 // Remove last empty element. 280 if ('' == end($o)) { 281 array_pop($o); 282 } 283 279 284 echo "function validateInput() 280 285 { 281 286 global \$fv; 282 287 283 "; 284 echo join("\n ", $o); 285 echo " 288 " . join("\n ", $o) . " 286 289 }"; 287 290 ?>
Note: See TracChangeset
for help on using the changeset viewer.