Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: ¿ php_sqlite3 module compiling ? |
|
Author |
|
underxp
Joined: 16 Jan 2006 Posts: 34
|
Posted: Thu 13 Mar '08 18:45 Post subject: ¿ php_sqlite3 module compiling ? |
|
|
Hi all, I need to migrate a SQLite 2 php system to SQLite 3 with PHP 5.2.5, but I don't have the tools for compiling php_sqlite3 module, because I only found the extension in source (http://pecl.php.net/package/sqlite3/). I search with google a compiled DLL but don't have luck. I don't want to use PDO, because the funtions are different between php_sqlite and pdo_sqlite. php_sqlite3 use the same functions that php_sqlite. Can anyone help me please ? Thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
underxp
Joined: 16 Jan 2006 Posts: 34
|
Posted: Fri 14 Mar '08 3:51 Post subject: |
|
|
Well, I want to try this version even is Alpha.
BTW SQLite 3 client is right now in version 3.5.6, the module php_sqlite3 is in version 0.4. I wrote to Scott MacVicar and he compile the extension for me. Thanks for your response. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 14 Mar '08 14:55 Post subject: |
|
|
If you got that extension, please give us a link where we can download it |
|
Back to top |
|
underxp
Joined: 16 Jan 2006 Posts: 34
|
Posted: Fri 14 Mar '08 16:00 Post subject: |
|
|
Hi, the link for the compiled extension (PHP 5.2.5) is:
http://whisky.macvicar.net/php_sqlite3.dll
This version don't have enabled the FTS3 , Scott says:
Quote: |
I've had to disable the FTS3 support for the moment due to some obscure
Windows crash that I don't currently have time to track down.
|
Please, if you test this extension and found any bug, write to Scott MacVicar <scottmac@php.net> for report it.
Thanks to Scott for compiling this module. Download it, test it, report bugs, and write here your opinions about it.
BTW, php_sqlite.dll depends on php_pdo.dll, php_sqlite3.dll don't |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 14 Mar '08 17:24 Post subject: |
|
|
Thanks a lot for that link.
I'm not used to SQLite much. What is FTS ? |
|
Back to top |
|
underxp
Joined: 16 Jan 2006 Posts: 34
|
Posted: Sat 15 Mar '08 2:24 Post subject: |
|
|
FTS = Full Text Search, technique for searching a computer-stored document or database. In a full text search, the search engine examines all of the words in every stored document as it tries to match search words supplied by the user . From the SQLite Wiki:
Quote: |
fts tokenizes its input data and builds an index over the resulting terms. To do queries using this index, a new MATCH operator is introduced. An example fts table:
CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients);
INSERT INTO recipe VALUES (
'broccoli stew', 'broccoli peppers cheese tomatoes'
);
INSERT INTO recipe VALUES (
'pumpkin stew', 'pumpkin onions garlic celery'
);
INSERT INTO recipe VALUES (
'broccoli pie', 'broccoli cheese onions flour'
);
INSERT INTO recipe VALUES (
'pumpkin pie', 'pumpkin sugar flour butter'
);
To find recipes which are made with onions and cheese:
SELECT docid FROM recipe WHERE ingredients MATCH 'onions cheese';
The string to the right of the MATCH is tokenized, each token is found in the index, and the set of documents where both tokens are present is returned. Since the MATCH has column ingredients on the left, this only finds recipes where the tokens are present in that column. A search over all columns can be done using the column with the same name as the table:
SELECT docid FROM recipe WHERE recipe MATCH 'stew';
The query language for the right-hand-side of the MATCH operator has a few variants, here described by example:
-- Recipes with 'onions' and 'cheese' each in any column of the row.
SELECT * FROM recipe WHERE recipe MATCH 'onions cheese';
-- Recipes with either 'onions' or 'cheese' each in any column of
-- the row. OR must be upper-case.
SELECT * FROM recipe WHERE recipe MATCH 'onions OR cheese';
-- Recipes with 'stew' in the name column and 'onions' in the
-- ingredients column.
SELECT * FROM recipe WHERE recipe MATCH 'name:stew ingredients:onions';
-- Recipes with 'green' and 'onions' next to each other in that
-- order, in any field. Known as "phrase search".
SELECT * FROM recipe WHERE recipe MATCH '"green onions"';
-- Recipes which use onions but not cheese.
SELECT * FROM recipe WHERE recipe MATCH 'onions -cheese';
-- Recipes which have 'onions' in any field and 'cheese' in none.
SELECT * FROM recipe WHERE recipe MATCH 'onions -cheese';
-- Prefix search, finds recipes with words that start with the
-- characters 'bu' (such as "butter").
SELECT * FROM recipe WHERE recipe MATCH 'bu*';
|
The FTS3 Wiki is on http://www.sqlite.org/cvstrac/wiki?p=FtsUsage |
|
Back to top |
|
underxp
Joined: 16 Jan 2006 Posts: 34
|
Posted: Fri 11 Apr '08 16:43 Post subject: |
|
|
Hi, scott update the extension to version 0.5-dev:
Quote: | - Upgraded bundled SQLite to 3.5.7
- Added SQLite3::lastErrorCode and SQLite3::lastErrorMsg
- Added SQLite3_result::columnType to get type of a column in a result set
- Added flags to SQLite3::open to allow databases to be opened read only. (PHP 5.3+ for now)
- Fixed incorrect column count being returned on a non executed statement
- Fixed lack of library when using the shared sqlite3 |
the link for the compiled extension (PHP 5.2.5) is:
http://whisky.macvicar.net/php_sqlite3.dll
BTW, I'm using it and is very stable !!!!!! |
|
Back to top |
|
|
|
|
|
|