mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
optimizing sqlite driver to look for the "From" keyword in reverse order on the sql string
This commit is contained in:
parent
4948280ba8
commit
2b9c6b8609
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ class DboSqlite extends DboSource {
|
||||||
// so try to figure it out based on the querystring
|
// so try to figure it out based on the querystring
|
||||||
$querystring = $results->queryString;
|
$querystring = $results->queryString;
|
||||||
if (stripos($querystring, 'SELECT') === 0) {
|
if (stripos($querystring, 'SELECT') === 0) {
|
||||||
$last = stripos($querystring, 'FROM');
|
$last = strripos($querystring, 'FROM');
|
||||||
if ($last !== false) {
|
if ($last !== false) {
|
||||||
$selectpart = substr($querystring, 7, $last - 8);
|
$selectpart = substr($querystring, 7, $last - 8);
|
||||||
$selects = explode(',', $selectpart);
|
$selects = explode(',', $selectpart);
|
||||||
|
|
Loading…
Add table
Reference in a new issue