Ticket #801: ticket-801.patch.diff

File ticket-801.patch.diff, 0.9 kB (added by mattdeir, 2 years ago)

please test and give feedback. tested on 3.23.59-nightly-20050301-log

  • lib/SGL/Sql.php

    old new  
    109109            // replace ; for MaxDB and Oracle 
    110110            if (($conf['db']['type'] == 'oci8_SGL') || ($conf['db']['type'] == 'odbc')){ 
    111111                $sql = preg_replace("/;\s*$/", '', $sql); 
     112            }elseif (($conf['db']['type'] == 'mysql_SGL') || ($conf['db']['type'] == 'mysql')){ 
     113                $aEnvData = unserialize(file_get_contents(SGL_VAR_DIR . '/env.php')); 
     114                //check for mysql 3.23 or similar and remove the ;'s. 
     115                if(ereg("3.23",$aEnvData['db_info']['version'])){ 
     116                    $sql = preg_replace("/;\s*$/", '', $sql); 
     117                } 
    112118            } 
    113119            // Execute the statement. 
    114120            $res = $dbh->query($sql);