From: Ilia Alshanetsky Date: Mon, 2 Aug 2004 22:43:40 +0000 (+0000) Subject: Allow sqlite_fetch_column_types() to properly handle table names with X-Git-Tag: PRE_ZEND_VM_DISPATCH_PATCH~269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd7dafab7c199d1482f5eb45b97d714b2dffa821;p=php Allow sqlite_fetch_column_types() to properly handle table names with spaces in them. --- diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index fee732b0a6..9fc3ec860e 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1597,7 +1597,7 @@ PHP_FUNCTION(sqlite_fetch_column_types) DB_FROM_ZVAL(db, &zdb); } - if (!(sql = sqlite_mprintf("SELECT * FROM %q LIMIT 1", tbl))) { + if (!(sql = sqlite_mprintf("SELECT * FROM '%q' LIMIT 1", tbl))) { RETURN_FALSE; }