Skip to content

Commit bfe9fd8

Browse files
committed
Merge pull request #101 from AD7six/sqlite3-better-name-detection
Make column detection more robust
2 parents 06d854c + b732674 commit bfe9fd8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Model/Datasource/Database/Sqlite3.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@ public function resultSet(&$results) {
485485
// so try to figure it out based on the querystring
486486
$querystring = $results->queryString;
487487
if (stripos($querystring, 'SELECT') === 0) {
488-
$last = stripos($querystring, 'FROM');
488+
$last = stripos($querystring, ' FROM');
489489
if ($last !== false) {
490-
$selectpart = substr($querystring, 7, $last - 8);
490+
$selectpart = substr($querystring, 7, $last - 7);
491491
$selects = explode(',', $selectpart);
492492
}
493493
} elseif (strpos($querystring, 'PRAGMA table_info') === 0) {

0 commit comments

Comments
 (0)