|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25179 sqlite appending one extra char at end of each table name
Submitted: 2003-08-20 11:01 UTC Modified: 2003-08-20 17:42 UTC
From: Assigned:
Status: Closed Package: SQLite related
PHP Version: 4.3.3RC4 OS: RH-8.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 + 45 = ?
Subscribe to this entry?

 [2003-08-20 11:01 UTC]
The sqlite library is appending an extra character onto
the end of any specified table name. For example, if I
specify a table name of 'foo' for a query, sqlite looks for a table named 'fooo'. It takes the last character of the table name supplied, and appends an extra one of those chars onto the end of the table name.

If I do a select and supply a table name of 'fo', sqlite will return data from the table 'foo'.

Sqlite was installed with pear.

Reproduce code:
# The table 'foo' exists and has data in it.
# returns data.

if ($db = @sqlite_open('test.db', 0666, $sqliteerror)) { 
    $result = sqlite_query($db,'SELECT * from "fo');
} else {
    die ($sqliteerror);

# Changing the name to 'foo' returns a
# 'no such table' error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-20 11:40 UTC]
Your script looks borked (are you using the correct quotes?).

Also, the is the last letter is missing from your name in your email address? Are you sure you aren't suffering from some weird brain<->finger packet loss problem? ;-)

 [2003-08-20 15:06 UTC]
Where's that damn crack pipe....

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 14:01:30 2023 UTC