includes/sql_parse.php
changeset 527 21e11f564463
parent 526 b2fb50d572c7
child 536 218a627eb53e
equal deleted inserted replaced
526:b2fb50d572c7 527:21e11f564463
    48   private $tpl_strings;
    48   private $tpl_strings;
    49   
    49   
    50   /**
    50   /**
    51    * Constructor.
    51    * Constructor.
    52    * @param string If this contains newlines, it will be treated as the target SQL. If not, will be treated as a filename.
    52    * @param string If this contains newlines, it will be treated as the target SQL. If not, will be treated as a filename.
       
    53    * @param string If true, force as raw SQL, i.e. don't treat as a filename no matter what
    53    */
    54    */
    54   
    55   
    55   public function __construct($sql)
    56   public function __construct($sql, $force_file = false)
    56   {
    57   {
    57     if ( strpos($sql, "\n") )
    58     if ( strpos($sql, "\n") || $force_file )
    58     {
    59     {
    59       $this->sql_string = $sql;
    60       $this->sql_string = $sql;
    60     }
    61     }
    61     else
    62     else
    62     {
    63     {