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

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

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

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

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
$val=127.0.0.1; $query=INSERT INTO node set uri=\$val\, name=\bla\; Try this one... think is better n less confusing for u... On Sun, 19 Sep 2004 19:13:48 +0200, Darryl [EMAIL PROTECTED] wrote: $val = 127.0.0.1; $query = INSERT INTO node (uri,name) VALUES ('.$val.','bla'); Try that?

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

RE: [PHP-DB] SQLite security

2004-08-16 Thread Jason Sheets
SQLite security is based primarily on filesystem security, placing the database outside the web root (i.e. /home/user/private/SQLITE.db instead of /home/www/SQLITE.db) and including an option in your base configuration or include file to point to the database file. You can use Mcrypt, OpenSSL or

[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

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,