Login   Register  
PHP Classes
elePHPant
Icontem

File: exec.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Brommer  >  MySQL Parser  >  exec.php  >  Download  
File: exec.php
Role: Example script
Content type: text/plain
Description: Example command line script
Class: MySQL Parser
Converts boolean expressions into MySQL conditions
Author: By
Last change:
Date: 10 years ago
Size: 456 bytes
 

Contents

Class file image Download
#!/usr/bin/php -f
<?php
$contents 
file('parsefile.txt');
require_once(
'parser.class.php');



$parser = new mysql_parser();
foreach(
$contents as $line)    {
        if (
substr(trim($line), 02)=='--'||trim($line) == '') continue;
        echo 
"$line\n";
        
$res $parser->parse($parser->atomize($line));
        if (
$parser->error)    {
                foreach(
$parser->log as $msg)    {
                        echo 
"\t-$msg\n";
                    }
                
//echo "\n";
            
}
        echo 
"$res\n\n";
    }
//echo $parser->result;    

?>