diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-12-14 18:47:14 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-12-14 18:47:14 +0000 |
commit | 02de761345098efa4fc5ffc297df289a383e44a4 (patch) | |
tree | a3ff820cfc25409dd9f357a2f13fae0154f91546 | |
parent | 7a6246385f9783c03386798d93e489a38909a489 (diff) | |
download | php-git-02de761345098efa4fc5ffc297df289a383e44a4.tar.gz |
MFH: do not mangle column names.
-rw-r--r-- | ext/sqlite/sqlite.c | 6 | ||||
-rwxr-xr-x | ext/sqlite/tests/sqlite_011.phpt | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 9c979a6c97..e4ba80f4ac 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -904,10 +904,8 @@ next_row: /* first row - lets copy the column names */ rres->col_names = safe_emalloc(rres->ncolumns, sizeof(char *), 0); for (i = 0; i < rres->ncolumns; i++) { - colname = strchr(colnames[i], '.'); - if (!colname++) { - colname = (char*)colnames[i]; - } + colname = (char*)colnames[i]; + if (SQLITE_G(assoc_case) == 1) { php_sqlite_strtoupper(colname); } else if (SQLITE_G(assoc_case) == 2) { diff --git a/ext/sqlite/tests/sqlite_011.phpt b/ext/sqlite/tests/sqlite_011.phpt index 1aa6704249..d808e368a6 100755 --- a/ext/sqlite/tests/sqlite_011.phpt +++ b/ext/sqlite/tests/sqlite_011.phpt @@ -17,11 +17,17 @@ $r = sqlite_query("SELECT * from foo, bar", $db, SQLITE_ASSOC); var_dump(sqlite_fetch_array($r)); ?> --EXPECT-- -array(3) { - ["c1"]=> +array(6) { + ["foo.c1"]=> + string(1) "1" + ["foo.c2"]=> + string(1) "2" + ["foo.c3"]=> + string(1) "3" + ["bar.c1"]=> string(1) "4" - ["c2"]=> + ["bar.c2"]=> string(1) "5" - ["c3"]=> + ["bar.c3"]=> string(1) "6" } |