Re: [sqlite] sqlite3 datbase disk image malformed

2009-03-07 Thread John LeSueur
Your rsync command might be ignoring any journal files that may be outstanding. John On Fri, Mar 6, 2009 at 10:33 AM, Derrell Lipman wrote: > On Thu, Mar 5, 2009 at 7:39 AM, Peter van Dijk > wrote: > > > On Thu, Mar 05, 2009 at 04:30:50AM -0800,

Re: [sqlite] Problem writing to database using PHP under OS X

2008-07-14 Thread John LeSueur
On Mon, Jul 14, 2008 at 4:28 AM, Tim Streater <[EMAIL PROTECTED]> wrote: > I have a small script which shows this problem: if I run it from the > command line I can read from and write to the database. If I run it in a > browser it fails at the write with "General error: 14 unable to open >

Re: [sqlite] Using semiclon!

2006-03-09 Thread John LeSueur
try using single ticks instead of quotes:Select Surname||', '||First_Name||' ; '||Address as "Details" ... This is the more correct(in SQL) way of specifying a string. John On 3/9/06, Clay Dowling <[EMAIL PROTECTED]> wrote: > > Roger said: > > > The reason i need a semicolon is because, i am

Re: [sqlite] threading and win32

2005-10-19 Thread John LeSueur
On 10/19/05, Wilson Yeung <[EMAIL PROTECTED]> wrote: > > I wasn't doing a very good job paying attention to the FAQ about > threading and SQLite when I wrote a bunch of code on win32. > > I'm sharing sqlite3 database handles between threads, although I am > ensuring that no two threads are

Re: [sqlite] sqlite and webhosts -SOLVED

2005-10-07 Thread John LeSueur
library built in. So if your webhost didn't strip it out, then it's there. try phpinfo() to see what modules are available. If sqlite is in the list, then you can create databases with the sqlite_open() function. To see more, go to php.net/sqlite. John LeSueur

Re: [sqlite] Rewriting a query

2005-10-03 Thread John LeSueur
[EMAIL PROTECTED] wrote: Robin Breathe <[EMAIL PROTECTED]> wrote: Hugh Gibson wrote: I'm intrigued. How do you get SQLite to use a multi-column index as it's primary key (i.e. B-tree hash)? Please elaborate. Simply CREATE TABLE TransactionList (sTransactionID Text(13)

Re: [sqlite] Rewrite of where.c without DOUBLE Values

2005-10-03 Thread John LeSueur
his choice in *pFlags */ int *pnEq /* Put the number of == or IN constraints here */ ){ ppIndex = pSrc->pTab->pIndex; } I'm pretty sure this is a bad idea, but you could do it for now, just to get started on testing and things. John LeSueur

Re: [sqlite] SQL for finding non-matching rows

2005-08-19 Thread John LeSueur
Clark Christensen wrote: I've seen it described here before, but I can't seem to find it. select a from t1 where a not in (select b from t2); will find the resultset I'm looking for, and it seems OK when the resulting in () list is small (maybe < 1000). But it seems less than ideal when the

Re: [sqlite] RFC Beginning digit in column name

2005-08-10 Thread John LeSueur
mysql, no matter what you're migrating to. would allow projects that want to stick with MySQL to also offer a SQLite version with little effort. How off the wall am I with this? -m John LeSueur

Re: [sqlite] New Query Question

2005-07-26 Thread John LeSueur
the time, no matter what. John LeSueur

Re: [sqlite] Query locking up SQLite

2005-07-25 Thread John LeSueur
David Fowler wrote: SQLite Version 3.2.2. Is this a bug, or is my SQL that bad? Query 1: SELECT * FROM table1, table2 WHERE (table1.value LIKE "%value%" AND table1.table2_id = table2.id); This query works perfectly, can't fault it. But when I do this, SQLite locks out (Command line interface,

Re: [sqlite] SQLite 3 manifest typing question

2005-07-20 Thread John LeSueur
command yourself in sqlite 2.8. I wouldn't think it would be that hard. In fact, you could just change the dump command to quote all the values unconditionally, and everything would still work. John LeSueur

Re: [sqlite] Syntax Help

2005-07-06 Thread John LeSueur
Ray Mosley wrote: AS a DB rookie, I have replaced the .txt files in an Tcl/Tk application with a SQLite database, so it still reads very much like file I/O. While in a loop I wrote several records to my files, so now I simply do an INSERT. I keep reading that you optimize performance by using

Re: [sqlite] Update variable problems. Bug?

2005-07-03 Thread John LeSueur
le to find a column by that name, then it assumes you meant a string. But if you really mean a string, you should use single ticks. UPDATE dnsbl SET flags='IP', ctime=1120286944, mtime=1120311794, cnt=2, refcon=0 WHERE ip=-596248527; John LeSueur

Re: [sqlite] php 5 / sqlite 3 - is it possible ??

2005-07-02 Thread John LeSueur
Philip Butler wrote: Hi all, I have been trying to use the latest sqlite 3 with PHP 5. I have sqlite 3 compiled OK, but cannot seem to figure out how to get PHP 5 to "link it in". I have tried options like --with-sqlite=/path (where path is the path to the sqlite library). I have also

Re: [sqlite] VIEW PROBLEM IN VERSION 3.2.2

2005-06-16 Thread John LeSueur
ma short_column_names = 1", "pragma short_column_names = 0", "pragma short_column_names = ON", "pragma short_column_names = OFF", with no results. If Somebody have any idea, please let me know. Thanks and Regards Xavier John LeSueur wrote: Xavier Aguila wro

Re: [sqlite] VIEW PROBLEM IN VERSION 3.2.2

2005-06-16 Thread John LeSueur
gards Xavier select "t1.a" from view1; should work. You might wish to use pragma short_column_names = 1 to preserve the previous behavior. John LeSueur.

Re: [sqlite] updating records problem

2005-05-18 Thread John LeSueur
Will Leshner wrote: On May 18, 2005, at 8:02 AM, Jay Sprenkle wrote: When I wrote applications that allowed the user to enter queries I added the unique key row to their query. I presented them with the data they requested and either did not show the record id, or made it read only. This allowed

Re: [sqlite] Does sqlite really support transaction?

2005-05-12 Thread John LeSueur
Thomas Briggs wrote: A transaction is a way to make a group of things that happens atomic, but an SQL statement that generates an error doesn't really make anything happen, so it has no impact on the transaction itself or any of the other actions within it. That kinda the whole point, in a way

Re: [sqlite] Trouble with column names

2005-04-25 Thread John LeSueur
wise, do not lower case, search in a case sensitive way to find the column. On creation of a view: Whatever the select returns is used as the column names. If no "" were used in the select statement, these will all be lowercase fieldnames. the tablenames are not included in the column name

Re: [sqlite] CASE WHEN .. END AS 'blah' problem

2005-04-20 Thread John LeSueur
e actual name of the column. John LeSueur

Re: [sqlite] Multiple Tables on one Flat File

2005-04-14 Thread John LeSueur
[EMAIL PROTECTED] wrote: Eric: thank you for your reply. I ended up creating a %dbh hash with $table as the index along with one Operating System file for each table. I was hoping there was a way not to create so many Operating System files because of the extra Administration they require. can

Re: [sqlite] sqlite performance problem

2005-04-12 Thread John LeSueur
ecting to see. If not, you may want to consider that Thomas was right, and a general solution may not be able to perform the calculations with the same speed that you are hoping for. John LeSueur

Re: [sqlite] Column Names (revisited)

2005-04-07 Thread John LeSueur
I think from recent discussions, it became clear that supporting these extra pragmas was becoming a big headache. I don't know that tsupport has been deliberately dropped, but it may have fallen by the wayside. The reasons for this are that the behavior now matches all the other RDBMSes in

Re: [sqlite] idea: sqlite3_begin() and sqlite3_end() ?

2005-04-01 Thread John LeSueur
Kervin L. Pierre wrote: Hello, These functions are not supposed to be replace nested transactions. They just use the tools the API *already* has to make it easier to work with transactions in recursive and inter-dependent functions/methods. sqlite3_rollback() would rollback the transaction. It

Re: [sqlite] idea: sqlite3_begin() and sqlite3_end() ?

2005-04-01 Thread John LeSueur
Ned Batchelder wrote: I went through this same issue in my application, and realized that rollbacks throw off the whole scheme. This proposal doesn't account for rollbacks: how would they work? If only the outermost "transaction" would truly perform a rollback, then what would an inner one do?

Re: [sqlite] How to do NULL Handling in SELECT Statement?

2005-03-22 Thread John LeSueur
Stefan Finzel wrote: Hi, what is the correct way to query for NULL-values? I use SQLite version 3.2.0 create table t1(a int, b char); insert into t1 values(1, '2'); insert into t1 values(3,NULL); insert into t1 values(NULL,'4'); select * from t1 where b=NULL; -- this gives no result at all

Re: [sqlite] Relative efficiency of joins, subselects, and union/intersect

2005-02-22 Thread John LeSueur
Nathan Kurz wrote: Hello -- I've got a SQL problem that I'm guess is about half general and half SQLite specific. I'm pretty new to SQLite, familiar with basic SQL (mostly from MySQL), and I'm accessing SQLite through C and Perl. The problem I'm working on relates to tagging music for some music

Re: [sqlite] ORDER BY / HAVING clauses and aliased field names

2005-02-20 Thread John LeSueur
RE 1 GROUP BY countries.country_id HAVING 1 ORDER BY coalesce(cd1.country_name, cd2.country_name) ASC; John LeSueur

Re: [sqlite] Re: AUTOINCREMENT Functionality by default required in 3.0.8 (Is it possible?)

2005-02-17 Thread John LeSueur
ere num = 2; insert into test (num, info) values(null, 'number four'); Wouldn't you have: num|info|num2 1|number one|1 3|number three|3 3|number four|3 John LeSueur

Re: [sqlite] Basic insert statement - syntax problem

2005-02-17 Thread John LeSueur
were defined within pairs of double-quote symbols and were always referred to using double-quote delimiters. So while sqlite would understand 'mri_output', it is not necessary, and it would be preferred to use double quotes:"mri_output" John LeSueur

Re: [sqlite] Update INTEGER PRIMARY KEY

2005-02-06 Thread John LeSueur
[EMAIL PROTECTED] wrote: Hello, My application requires records in a table to be arrange in order. I am uisng ID (Integer Primary Key) filed to keep track order. When I want to insert a record between some records, I am trying to do following SQL: -- update pb_transactiondetail set ID = ID

Re: [sqlite] Unicode select problem

2005-01-27 Thread John LeSueur
Cory Nelson wrote: 3.0.8, and I'm using sqlite3_bind_text16 to give the string. On Thu, 27 Jan 2005 14:31:04 -0800, Will Leshner <[EMAIL PROTECTED]> wrote: On Thu, 27 Jan 2005 13:59:45 -0800, Cory Nelson <[EMAIL PROTECTED]> wrote: Are there some limitations in SQLite's Unicode support? I'm

Re: [sqlite] Preventing TableNames.columns inside SELECT

2004-10-26 Thread John LeSueur
get tired of using AS all the time. With the following patch, just set pragma short_column_names to be 1 and sqlite will return column names formatted just like every other database. John Lesueur diff -NU3 -r ./select.c ../../sqlite-orig/src/select.c --- ./select.c2004-06-19 11:31

Re: [sqlite] What does the first expr do in a CASE statement ?

2004-09-17 Thread John LeSueur
to determine which "then value" to return. It's very similar to a switch statement. Case can also be used as an if elseif else type statement, when the field is omitted. select case when field1 is null then field2 else field1 end as casefield from table1; John LeSueur

Re: [sqlite] 3 tables in relation, really slow ...

2004-09-08 Thread John LeSueur
ou, andr3a Are there indexes on the id fields? John LeSueur

Re: [sqlite] nfs 'sillynames'

2004-09-03 Thread John LeSueur
be even if you only perform read only commands. The journal is what is used to keep track of the changes to the database. Anyone else have any thoughts? John LeSueur

Re: [sqlite] One more question on the C API performance

2004-09-03 Thread John LeSueur
there is such a discrepancy? Thanks very much in advance. Regards What does your callback do? Is it possible that's the bottleneck? John LeSueur

Re: [sqlite] SQLite for large bulletin board systems?

2004-08-28 Thread John LeSueur
) to be generic, but with some wrapper functions, its worth a lot more than the trouble you might run into by not doing it. Also PearDB for PHP has some nice wrappers for a variety of different databases, that make this simpler, and other languages would have similar(at least I think perl does). John

Re: [sqlite] Upgrading SQLite versions

2004-08-20 Thread John LeSueur
hough it is never reccomended). John LeSueur

Re: [sqlite] .db file size is not changing

2004-08-17 Thread John LeSueur
Unnikrishnan Nair wrote: Well, I deleted the rows, droped the index and did a vacuum on the table and nothing happen. I still have the file size as 198M. Is there anything else I am missing? --- Unnikrishnan Nair <[EMAIL PROTECTED]> wrote: You can always do a dump and reimport the db

Re: [sqlite] SQLite DB synchronization

2004-08-11 Thread John LeSueur
in another. Like I said, there are some drawbacks. I have yet to figure out how best to deal with deleting records. We have a delete flag, but with mutliple copies of the database, it's not possible to just delete a record on the two syncing machines. John LeSueur

Re: [sqlite] SQLite DB synchronization

2004-08-10 Thread John LeSueur
of deleting a record and then syncing. This is obviously a pretty simplistic way to do this, so any other suggestions I would find helpful. John LeSueur

Re: [sqlite] Performance Issue with SQLite Inserts

2004-06-24 Thread John LeSueur
ransaction? Sqlite likes transactions, and does much better with large sets of inserts inside transactions. John LeSueur - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[sqlite] Patch to fix pragma short_column_names in sqlite 3.0.0

2004-06-19 Thread John LeSueur
There seems to be a bug with pragma short_column_names that if it is set, column names are blank. Attached is a patch to fix this. To be honest, I'm not very familiar with sqlite's codebase, so the P3_STATIC is kind of a guess, but it compiled and ran just fine. The reason this pragma is