[sqlite] Understanding Foreign Key Contraints

2012-07-07 Thread Alan Chandler
ayoff_pick" immediately, but that because the deleting of "Team_in_competition" is deferred until commit time, by that time the commit happens there is no "Playoff_pick" to prevent the "Team_in_competition" from being deleted. Have I understood this right?

Re: [sqlite] Strange issue with sqlite 3.7.9

2012-07-05 Thread Alan Chandler
On 05/07/12 01:05, Richard Hipp wrote: On Wed, Jul 4, 2012 at 3:05 PM, Alan Chandler<a...@chandlerfamily.org.uk>wrote: The commit referenced by that page: http://www.sqlite.org/src/info/b23ae131874bc5c621f0 went into 3.7.9. So the problem was probably introduced in 3.7.9, not

Re: [sqlite] Strange issue with sqlite 3.7.9

2012-07-04 Thread Alan Chandler
On 04/07/12 18:52, Dan Kennedy wrote: On 07/04/2012 08:26 PM, Alan Chandler wrote: Due to hardware problems with my Debian Stable server, I have just upgraded to Ubuntu-Server 12.04. I have installed sqlite3 and when I ask it the version (with .version) it replies SQLite 3.7.9 2011-11-01 00:52

[sqlite] Strange issue with sqlite 3.7.9

2012-07-04 Thread Alan Chandler
to have been caused by a change made by 3.7.10, whereas this is 3.7.9 and given its the version of choice in ubuntu it might be better to clarify whether there is a problem there or not. -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite

Re: [sqlite] Strange difference between sqlite 3.7.3 and 3.7.10

2012-03-08 Thread Alan Chandler
On 09/03/12 00:29, Richard Hipp wrote: On Thu, Mar 8, 2012 at 6:47 PM, Alan Chandler<a...@chandlerfamily.org.uk>wrote: The complete database schema is here https://github.com/akc42/**AKCMoney/blob/master/app/inc/**database.sql<https://github.com/akc42/AKCMoney/blob/master/app/inc/dat

Re: [sqlite] Strange difference between sqlite 3.7.3 and 3.7.10

2012-03-08 Thread Alan Chandler
On 08/03/12 23:32, Richard Hipp wrote: On Thu, Mar 8, 2012 at 5:44 PM, Alan Chandler<a...@chandlerfamily.org.uk>wrote: I have been running a financial management application application I wrote for a number of years. My "production" version runs on Debian stable system as a r

Re: [sqlite] Strange difference between sqlite 3.7.3 and 3.7.10

2012-03-08 Thread Alan Chandler
On 08/03/12 22:44, Alan Chandler wrote: I have been running a financial management application application I wrote for a number of years. My "production" version runs on Debian stable system as a result is running sqlite v3.7.3. My personal development machine is running Debia

[sqlite] Strange difference between sqlite 3.7.3 and 3.7.10

2012-03-08 Thread Alan Chandler
expect. The other important aspect. If I don't use a view, but instead replace "FROM dfxaction" with "FROM xaction" using the raw table then 3.7.10 delivers all the records I would expect. So I am completely perplexed as to why there are changes between behaviour. Can anyone

Re: [sqlite] Detach says database is locked

2010-10-21 Thread Alan Chandler
On 21/10/10 00:35, Igor Tandetnik wrote: > Alan Chandler<a...@chandlerfamily.org.uk> wrote: >> Further to my other post related to attaching to databases with PHP PDO, >> I have now managed to ATTACH OK >> >> However, when I come to DETACH, I am getting a Datab

[sqlite] Detach says database is locked

2010-10-20 Thread Alan Chandler
SELECT I don't really understand why I can't DETACH. Can anyone give me any ideas what this could be. -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

[sqlite] Strange position as a result of ATTACH

2010-10-20 Thread Alan Chandler
). PS = I suppose it may be a php bug that it is using the v1 version of prepare -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] moving from mysql

2010-10-16 Thread Alan Chandler
tle time when its not encorporated back in. For me, the biggest problem is having sufficiently recent versions of all the code and libraries to support WAL mode. At least one host (Bluehost) that I use can't handle that. -- Alan Chandler http://www.chandlerfamily.org.uk _

Re: [sqlite] Nth row of on sqlite DB

2010-10-14 Thread Alan Chandler
ppen to be ordered - but that is an implementation detail. Unless you use the ORDER BY clause the database may deliver the records in any order it wishes. It is not forced to use the ID order. -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users m

[sqlite] Is the SYNTAX diagram wrong

2010-10-14 Thread Alan Chandler
I seem to be doing plenty of SELECT * FROM a LEFT JOIN b WHERE ...; but looking at the syntax diagrams at http://www.sqlite.org/lang_select.html it looks like I have to follow LEFT with OUTER. Shouldn't the diagram allow OUTER to be bypassed? -- Alan Chandler http

Re: [sqlite] Just want to double check on index need

2010-10-14 Thread Alan Chandler
On 14/10/10 17:28, Dan Kennedy wrote: > > On Oct 14, 2010, at 10:43 PM, Alan Chandler wrote: >> CREATE TABLE div_winner_pick ( ... >> PRIMARY KEY (cid,confid,divid,uid) >> ); ... >> >> CREATE INDEX div_win_pick_uid_cid_idx ON div_winner_pick (uid

[sqlite] Just want to double check on index need

2010-10-14 Thread Alan Chandler
ndex across a lesser number of columns (because I am querying for all records that match where I can define the values "cid" and "uid" in the example above) it is still and advantage to create it separately. -- Alan Chandler http://www.chandlerfamily.org.uk

Re: [sqlite] Which data type is better for date?

2010-09-04 Thread Alan Chandler
ltiplying by 1000). As a result, I almost always think about that approach as my first choice when writing a new app. -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bi

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 20:29, Alan Chandler wrote: > On 26/08/10 17:38, Simon Slavin wrote: > >> So someone can check it out. Try it with a VIEW that definitely doesn't >> exist, or use >> >> CREATE VIEW IF NOT EXISTS ... >> > > As far as I can work it out,

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
aving completed that script and then checking the schema with the command line sqlite3 utility, the view no longer exists. This seems completely wrong. Surely it should do this check at *execute* time not at *prepare* time. -- Alan Chandler http://www.chandl

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
On 26/08/10 13:38, Simon Slavin wrote: > > On 26 Aug 2010, at 12:12pm, Alan Chandler wrote: > >> This time it reported that the view it would have created failed because >> the table (view) already existed. > > I'm sorry to ask this, but can you check for us whether a

Re: [sqlite] Parameters in views preparation

2010-08-26 Thread Alan Chandler
reading this file The dfxaction view is created almost at the end of this file. http://www.chandlerfamily.org.uk/sites/default/files/files/snippets/database.sql.txt (someone asked further down the thread whether the view really exists. Yes it does and its not temporary). -- Alan Chandler http://www.ch

Re: [sqlite] Suggestion for project: Chat

2010-08-24 Thread Alan Chandler
s are moderated, and others they see only when they are members of a specific group - we used them as committee rooms). There is a useable demo here http://chat.hartley-consultants.com/ which is stand alone. The code can also link to an SMF forum and derive username from the login identity of the use

Re: [sqlite] [PHP5-FPM] Sqlite3 or pdo_sqlite?

2010-07-24 Thread Alan Chandler
On 24/07/10 15:41, Alan Chandler wrote: > On 24/07/10 14:18, J. King wrote: > >> PDO_sqlite3 also does have the advantage of being available by default >> since PHP 5.0.0, whereas sqlite3 is only available by default since PHP >> 5.3.0. I'm aware of no other advantages to

Re: [sqlite] [PHP5-FPM] Sqlite3 or pdo_sqlite?

2010-07-24 Thread Alan Chandler
typical web site) where there might be some locking issues. -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help with complex UPDATE question

2010-07-22 Thread Alan Chandler
value > where KEY = 0 from the COL1 value of the current row so that the result > would be. > > 0, 0 > 1, 1 > 2, 2 > 3, 3 > > Can this be done in SQL? It does not have to be one UPDATE/SELECT > statement. > > Thank you > pw > > UPDATE table1

Re: [sqlite] Couple of questions about WAL

2010-07-22 Thread Alan Chandler
1 and at that point a writer does BEGIN IMMEDIATE, SELECT3, UPDATE, COMMIT, and then I continue with SELECT2 COMMIT, will SELECT1 and SELECT2 have a consistent view of the database unaffected by the UPDATE in the middle. In other words, is the Readers view of how far up the WAL it is allowed to look

[sqlite] Couple of questions about WAL

2010-07-22 Thread Alan Chandler
) on a version field on the database to ensure its the same as when I originally read it, ROLLBACK if it isn't, but if it is proceed with the INSERTS and UPDATES and finally COMMIT). -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users

[sqlite] Understanding how to use locking optimally

2010-07-10 Thread Alan Chandler
to managing locking do you take? -- Alan Chandler http://www.chandlerfamily.org.uk ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users