]> granicus.if.org Git - php/commitdiff
MFH: Allow sqlite_fetch_column_types() to properly handle table names with
authorIlia Alshanetsky <iliaa@php.net>
Mon, 2 Aug 2004 22:43:42 +0000 (22:43 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 2 Aug 2004 22:43:42 +0000 (22:43 +0000)
spaces in them.

ext/sqlite/sqlite.c

index fee732b0a61fefbea50e24dcd4e93938e08ec884..9fc3ec860e593e2690e1bed7f2eb6f701a073137 100644 (file)
@@ -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;
        }