|
@@ 1787-1790 (lines=4) @@
|
| 1784 |
|
// Correction Using |
| 1785 |
|
// USING (non reconnu en sqlite2) |
| 1786 |
|
// problematique car la jointure ne se fait pas du coup. |
| 1787 |
|
if (($this->sqlite_version == 2) && (strpos($this->query, "USING")!==false)) { |
| 1788 |
|
spip_log("'USING (champ)' n'est pas reconnu en SQLite 2. Utilisez 'ON table1.champ = table2.champ', 'sqlite'"); |
| 1789 |
|
$this->query = preg_replace('/USING\s*\([^\)]*\)/', '', $this->query); |
| 1790 |
|
} |
| 1791 |
|
|
| 1792 |
|
// Correction Field |
| 1793 |
|
// remplace FIELD(table,i,j,k...) par CASE WHEN table=i THEN n ... ELSE 0 END |
|
@@ 1850-1852 (lines=3) @@
|
| 1847 |
|
$this->query = str_replace('`','',$this->query); |
| 1848 |
|
|
| 1849 |
|
// Correction critere REGEXP, non reconnu en sqlite2 |
| 1850 |
|
if (($this->sqlite_version == 2) && (strpos($this->query, 'REGEXP')!==false)){ |
| 1851 |
|
$this->query = preg_replace('/([^\s\(]*)(\s*)REGEXP(\s*)([^\s\)]*)/', 'REGEXP($4, $1)', $this->query); |
| 1852 |
|
} |
| 1853 |
|
|
| 1854 |
|
|
| 1855 |
|
// |