Re: [PHP-DB] sqlite

2011-11-30 Thread Tamara Temple
David McGlone da...@dmcentral.net wrote: On Tue, 2011-11-29 at 16:31 -0600, Tamara Temple wrote: David McGlone da...@dmcentral.net wrote: places.sqlite is mozilla's bookmarks db and I was trying to read this db, but so far I've been unsuccessful. sqlite ver: 2.8.17 PHP version:

Re: [PHP-DB] sqlite

2011-11-29 Thread Tamara Temple
David McGlone da...@dmcentral.net wrote: places.sqlite is mozilla's bookmarks db and I was trying to read this db, but so far I've been unsuccessful. sqlite ver: 2.8.17 PHP version: PHP 5.3.3-1ubuntu9.6 with Suhosin-Patch php5-sqlite: 5.3.3-1ubuntu9.6 Okay, first off, mozilla uses sqlite3,

Re: [PHP-DB] sqlite

2011-11-29 Thread David McGlone
On Tue, 2011-11-29 at 16:31 -0600, Tamara Temple wrote: David McGlone da...@dmcentral.net wrote: places.sqlite is mozilla's bookmarks db and I was trying to read this db, but so far I've been unsuccessful. sqlite ver: 2.8.17 PHP version: PHP 5.3.3-1ubuntu9.6 with Suhosin-Patch

[PHP-DB] sqlite

2011-11-28 Thread David McGlone
Hi everyone, I've never fooled with sqlite before and I'm trying to do a simple query on an sqlite db, but I don't seem to be doing anything correct. I can't figure out how to just simply open a db file in the directory and query it and echo back the contents. Here's some code I've been messing

[PHP-DB] Sqlite inserts inside a PDO fetch loop

2010-05-28 Thread Brandon
Hello, I have a situation where I am trying to create an index of words contained in a particular table. The table is about 9,400 rows, and the index ends up being 1,500,000 words (rows). While creating the index, I do a select of the table, and extract the words. I cache these word

Re: [PHP-DB] Sqlite inserts inside a PDO fetch loop

2010-05-28 Thread Phpster
Can't you do a limit in the extract SQL and mark the records extracted so that you don't end up extraxting the same ones? Bastien Sent from my iPod On May 28, 2010, at 5:49 PM, Brandon version...@gmail.com wrote: Hello, I have a situation where I am trying to create an index of words

[PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
Hi, I'm not very experienced in PHP, and have always used mysql with it, but now I have a Sqlite database that I want to manipulate and I thought PHP would be an easy way to do it. It turned out that I need to use PDO to access a Sqlite V3 database, which is all new to me. I've managed

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
$sql = UPDATE ZITEM SET ZQUANTITY='0' WHERE ZPRODUCTID='.$prodid.'; Try to unquote $prodid: $sql = UPDATE ZITEM SET ZQUANTITY='0' WHERE ZPRODUCTID={$prodid}; Evert -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
still not working, $sesdb = new PDO('sqlite:file.sqlite3'); $query=SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE ZCategory != 14; $statement= $sesdb-query($query); $result=$statement-fetchAll(); foreach ($result as $product) { $prodname=$product[0]; $prodqty = $product[1];

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
can you put error_reporting(E_ALL); somewhere above the query and check if there's some output? On Wed, Aug 20, 2008 at 11:02 AM, Amy Gibbs [EMAIL PROTECTED] wrote: still not working, $sesdb = new PDO('sqlite:file.sqlite3'); $query=SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
No errors reported, but it's not updating the db, error_reporting(E_ALL); $sesdb = new PDO('sqlite:file.sqlite3'); $query=SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE ZCategory != 14; $statement= $sesdb-query($query); $result=$statement-fetchAll(); foreach ($result as $product) {

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
It's still not working :( $query=SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE ZCategory != 14; $statement= $sesdb-query($query); $result=$statement-fetchAll(); $statement=null; foreach ($result as $product) { $prodname=$product[0]; $prodqty = $product[1]; $prodid=$product[2]; $sql

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
Sorry, I'm out of options. Hopefully somebody on the list has a little more experience with PDO. On Wed, Aug 20, 2008 at 12:26 PM, Amy Gibbs [EMAIL PROTECTED] wrote: It's still not working :( $query=SELECT ZNAME, ZQUANTITY, ZPRODUCTID FROM ZITEM WHERE ZCategory != 14; $statement=

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
Thanks for trying, On 20 Aug 2008, at 11:42, Evert Lammerts wrote: Sorry, I'm out of options. Hopefully somebody on the list has a little more experience with PDO. On Wed, Aug 20, 2008 at 12:26 PM, Amy Gibbs [EMAIL PROTECTED] wrote: It's still not working :( $query=SELECT ZNAME, ZQUANTITY,

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
What happens if you try the UPDATE before a SELECT? $sesdb = new PDO('sqlite:file.sqlite3'); var_dump($sesdb-exec(UPDATE ZITEM SET ZQUANTITY=0 WHERE ZPRODUCTID=1)); On Wed, Aug 20, 2008 at 12:42 PM, Evert Lammerts [EMAIL PROTECTED] wrote: Sorry, I'm out of options. Hopefully somebody on the

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
It still doesn't run the update, but the var_dump displays bool(false) bool(false) $sesdb = new PDO('sqlite:wtc.sqlite3'); $sql = UPDATE ZITEM SET ZQUANTITY=0 WHERE ZPRODUCTID=bli-343; var_dump($sesdb-exec(UPDATE ZITEM SET ZQUANTITY=0 WHERE ZPRODUCTID=bli-343)); $sesdb-exec($sql);

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
Alright, getting somewhere. Try this: $sesdb = new PDO('sqlite:wtc.sqlite3'); if ($sesdb-exec(UPDATE ZITEM SET ZQUANTITY=0 WHERE ZPRODUCTID='bli-343') === false) { echo $sesdb-errorInfo(); } Don't forget the quotes around the product id (it's a string so you need them after all) On Wed, Aug

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
OK, I found one problem, the database file was not writeable, I added this code to find the error: $sesdb-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); However, I now get the following error: Warning: PDO::exec() [function.PDO-exec]: SQLSTATE[HY000]: General error: 14 unable to

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
It seems you've figured it out. I think you only need to chmod the DB directory and you're good to go. On Wed, Aug 20, 2008 at 1:04 PM, Amy Gibbs [EMAIL PROTECTED] wrote: OK, I found one problem, the database file was not writeable, I added this code to find the error:

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Amy Gibbs
OK, I found one problem, the database file was not writeable, I added this code to find the error: $sesdb-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); then I got the following error: Warning: PDO::exec() [function.PDO-exec]: SQLSTATE[HY000]: General error: 14 unable to open

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
Can you post the code you're using when you get the timeout? I guess you already tried to do a select only and an update only to check if it works? On Wed, Aug 20, 2008 at 1:11 PM, Amy Gibbs [EMAIL PROTECTED] wrote: OK, I found one problem, the database file was not writeable, I added this

Re: [PHP-DB] Sqlite 3 pdo update query problem

2008-08-20 Thread Evert Lammerts
Forget my last mail. Good to hear it's solved. On Wed, Aug 20, 2008 at 1:20 PM, Evert Lammerts [EMAIL PROTECTED] wrote: Can you post the code you're using when you get the timeout? I guess you already tried to do a select only and an update only to check if it works? On Wed, Aug 20, 2008 at

[PHP-DB] SQLite 3.0 extension for PHP

2005-04-14 Thread Hendy Irawan
Hi Is there an SQLite 3.0 extension for PHP? The one that's bundled with PHP 5.0.4 is SQLite 2. Also the same thing with the PECL package at http://pecl.php.net/package/SQLite Thanks a lot! -- Hendy Irawan http://www.gauldong.net http://dev.gauldong.net -- PHP Database Mailing List

[PHP-DB] sqlite access causes signal 11

2005-02-04 Thread Sven Oliver Moll
Hello, I'm using Serendipity (http://www.s9y.org), a blog system. Running it with an sqlite backend, it crashes the apache instance with a signal 11. After some analysing I can tell that the crash is processing an sqlite_query() statement. I created a small testcase that crashes with 5.0.3,

Re: [PHP-DB] sqlite access causes signal 11

2005-02-04 Thread Sven Oliver Moll
On Fri, 4 Feb 2005, Sven Oliver Moll wrote: Hello, I'm using Serendipity (http://www.s9y.org), a blog system. Running it with an sqlite backend, it crashes the apache instance with a signal 11. After some analysing I can tell that the crash is processing an sqlite_query() statement. I created a

[PHP-DB] SQLite problem INSERTing string

2004-09-19 Thread Stefan Reimers
Hello, I am currently experiencing a problem with an INSERT statement in SQLite. First of all an excerpt from the code: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES (.$val.,'bla'); $db_name = mysqlite; if($db_hdl = sqlite_open($db_name)){ $db_result =

RE: [PHP-DB] SQLite problem INSERTing string

2004-09-19 Thread Darryl
$val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES ('.$val.','bla'); Try that? -Original Message- From: Stefan Reimers [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQLite problem INSERTing string Hello, I am

Re: [PHP-DB] SQLite problem INSERTing string

2004-09-19 Thread M Saleh EG
that? -Original Message- From: Stefan Reimers [mailto:[EMAIL PROTECTED] Sent: Sunday, September 19, 2004 6:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQLite problem INSERTing string Hello, I am currently experiencing a problem with an INSERT statement in SQLite. First of all

RE: [PHP-DB] SQLite security

2004-08-21 Thread Ed Lazor
Shared hosting vulnerabilities have nothing to do with SQLite security. phpMyAdmin seems to be a popular choice for MySQL admin and I reckon there must be a few people who use it in shared hosting situations. Most of the shared hosting options I've seen lately list phpMyAdmin as one of the

Re: [PHP-DB] SQLite security

2004-08-20 Thread Adam Q
You can use Mcrypt, OpenSSL or any other crypographic provider to encrypt the information however for your application to be able to access the information you would also have to store the encryption key, reducing the protection offered. Any PHP MySQL connection script has the DB password in it

[PHP-DB] SQLite security

2004-08-16 Thread Adam Q
I would like to use an SQLite DB for the prefs for an open source PHP project, but I can't find any way to be sure the DB file is going to be secure... Is it possible to encrypt a SQLite DB file? With the current setup, if I include a .htaccess for the DB dir, this will only work for Apache -

RE: [PHP-DB] SQLite security

2004-08-16 Thread Jason Sheets
to access your database regardless of the engine you use. Jason -Original Message- From: Adam Q [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 7:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQLite security I would like to use an SQLite DB for the prefs for an open source PHP

[PHP-DB] sqlite and php4

2004-06-02 Thread Ivan Voras
I recently read the changelog (NEWS) file pointed by the announcment for 4.3.7rc1 on the web and came across this line: - Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia, Marcus) Does that mean sqlite is/will be in 4.3.7? (I'm only asking for a clarification :) )

[PHP-DB] SQLite and PHP4

2004-05-18 Thread Eli White
After playing around some with SQLite with PHP5, I decided that I wanted to have it working in PHP4 to start using it fully while waiting for PHP5 to come out. However, I ran into a snag ... after downloading it/phpizeing/configure/make/makeinstall ... I added the extension=sqlite.so line to

[PHP-DB] [Attn] Re: [PHP-DB] SQLite behaving bad?

2004-02-18 Thread Gerard Samuel
On Tuesday 17 February 2004 04:41 pm, Gerard Samuel wrote: Currently using sqlite 2.8.11 (distributed by php snaps) with php4.3.5rc2 on windows XP. Several months ago, I added support for sqlite in a database abstraction class I created. It worked great then. Im trying to see if things are

[PHP-DB] SQLite?

2004-02-03 Thread alain
Is it a good place to ask questions about SQLite? I'm going to test it with PHP5. Anybody here has done it? Alain -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] SQLite PRIMARY KEY.

2004-01-30 Thread Stuart Gilbert
I'm trying to get my PHP code to INSERT a new row and have the PRIMARY KEY field automatically set to the next available integer. I read, somewhere, that if I send null as the primary key value then SQLite will automatically incrememnt it for me. I've tried sending all sorts of things that I

Re: [PHP-DB] SQLite PRIMARY KEY.

2004-01-30 Thread Stuart Gilbert
Well, it appears I tried everything except JUST the word NULL. Sorry for wasting your time. Regards, Stuart Gilbert. Stuart Gilbert wrote: I'm trying to get my PHP code to INSERT a new row and have the PRIMARY KEY field automatically set to the next available integer. I read, somewhere,

[PHP-DB] SQLITE

2003-11-22 Thread Bronislav Kluka
Hi, I've got questions: I've got sqlite like PHP module (under windows). I tried this: a)execute script 1 (selecting from some table), it tooks 2 minutes b)execute script 2 , it tooks 3 minutes c)execute them both at the same time (from different browser windows), both of

[PHP-DB] SQLite

2003-11-20 Thread Bronislav Kluka
Hi, I was trying to work with SQLite, everything is OK, but it seems not to vork in thread, but in sequences. I mean: I perform a question which tooks 2 minutes, then another, which tooks 3 minutes, then I perform them both from 2 separated browser windows and both of them stops at the same time

[PHP-DB] SQLite

2003-10-31 Thread JR
I am trying to get the SQLite package to work with PHP and I am failing miserably. I have run: pear download http://pecl.php.net/get/SQLite-1.0.tgz, no problem here. Then I run: pear install SQLite-1.0.tgz and get a make error of: /tmp/tmpACnhIu/SQLite-1.0/sqlite.c:29:17: php.h: No such file or

[PHP-DB] sqlite question

2003-09-02 Thread andu
I use the following to delete a column from a table: $columns= 'col1','col2','col3','col4','col5'; $columns=str_replace(','.'col3','',$columns); $this-open_db(); //get the resource number($this-c_id) $r=sqlite_query($this-c_id,BEGIN); $r=sqlite_query($this-c_id,CREATE TEMPORARY TABLE

[PHP-DB] sqlite functions

2003-08-24 Thread andu
The function sqlite_fetch_all() mentioned in the changelog of version 1.0 of the extension is not documented in php docs. I'd like to know what is the diference between sqlite_fetch_all() and sqlite_array_query() about which the docs say that [it] is best suited to queries returning 45 rows or

[PHP-DB] R: [PHP-DB] SQLite

2003-07-07 Thread Alan D'Angelo - Media Beat Information Technology
Download a CHM version of manual !! -Messaggio originale- Da: Gerard Samuel [mailto:[EMAIL PROTECTED] Inviato: domenica 6 luglio 2003 1.16 A: [EMAIL PROTECTED] Oggetto: [PHP-DB] SQLite With respect to the PHP manual, are there any documentation to using this extention? Thanks

[PHP-DB] SQLite

2003-07-05 Thread Gerard Samuel
With respect to the PHP manual, are there any documentation to using this extention? Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php