cli) die("access denied"); } function get() { require_once 'SQL/Parser.php'; $p = new SQL_Parser(file_get_contents('../schema/schema.sql'),'MySQL'); $struct = $p->parse(); print_r($struct); require_once 'SQL/Parser/Compiler.php'; $c = new SQL_Parser_Compiler(); foreach($struct as $i=>$cmd) { if (!is_array($cmd)) { continue; } echo $c->compile($cmd) . "\n"; flush(); } } }