note 68648 added to ref.pdo-sqlite
| From: | maximkh | Date: | Fri, 04 Aug 2006 20:11:42 +0000 |
| Subject: | note 68648 added to ref.pdo-sqlite | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115558@lists.php.net to get a copy of this message | ||
In reply to Duffalo:
The current PHP version will happily work with SQLite 3.3.6, but you need to re-compile PHP using
the latest SQLite library.
On a different note, it seems that the developers got a little lazy and decided not to add any
support for integer, real, or blob data types. When using PDO's bindParam or bindValue methods,
the driver only uses either sqlite3_bind_null, or sqlite3_bind_text. That means that if you think
you're storing ints, even with PDO::PARAM_INT specified, it is still stored as string, taking
up a lot more space than it needs to and effectively eliminating all data-type support for SQLite
(you are only left with nulls or text).
In my opinion, this is a rather lousy implementation. I've submitted a feature/change request
to the bug tracking system, so I guess we can wait and see if full data type support is added in the
future. What I don't understand is why this was done in the first place. SQLite's API
could not be any easier to use, simply check the type of the variable passed, and if it's an
int use sqlite3_bind_int, if it's a float use sqlite3_bind_double. Why the forced conversion
into strings?
----
Server IP: 216.194.113.175
Probable Submitter: 66.92.22.30
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.pdo-sqlite.php
Edit -- https://master.php.net/note/edit/68648
Del: integrated -- https://master.php.net/note/delete/68648/integrated
Del: useless -- https://master.php.net/note/delete/68648/useless
Del: bad code -- https://master.php.net/note/delete/68648/bad+code
Del: spam -- https://master.php.net/note/delete/68648/spam
Del: non-english -- https://master.php.net/note/delete/68648/non-english
Del: in docs -- https://master.php.net/note/delete/68648/in+docs
Del: other reasons-- https://master.php.net/note/delete/68648
Reject -- https://master.php.net/note/reject/68648
Search -- https://master.php.net/manage/user-notes.php