Changeset 6532

Show
Ignore:
Timestamp:
09/01/08 15:38:40 (3 months ago)
Author:
ethans
Message:

Changes for sqlite3 syntax for LIKE _% queries and escaping _ properly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/ivr/functions.inc.php

    r6449 r6532  
    3030 
    3131                // Read old IVR format, part of xtns.. 
    32                 $sql = "SELECT context,descr FROM extensions WHERE extension = 's' AND application LIKE 'DigitTimeout' AND context LIKE '".$dept."aa_%' ORDER BY context,priority"; 
     32                if ($amp_conf["AMPDBENGINE"] == "sqlite3")  { 
     33                        $sql = "SELECT context,descr FROM extensions WHERE extension = 's' AND application LIKE 'DigitTimeout' AND context LIKE '".$dept."aa\_%' ESCAPE '\' ORDER BY context,priority"; 
     34                } 
     35                else  { 
     36                        $sql = "SELECT context,descr FROM extensions WHERE extension = 's' AND application LIKE 'DigitTimeout' AND context LIKE '".$dept."aa_%' ORDER BY context,priority"; 
     37                } 
    3338                $unique_aas = $db->getAll($sql); 
    3439                if (isset($unique_aas)) { 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads