Re: [sqlite] unreached code in sqlite3.c?

2015-02-12 Thread Tim Streater
On 12 Feb 2015 at 19:14, R.Smith rsm...@rsweb.co.za wrote: On 2/12/2015 8:50 PM, Doug Currie wrote: It's easy enough to fix if you want 0 to be a valid value for TERM_VNULL: #if TERM_VNULL if( pTerm-wtFlags TERM_VNULL ) continue; #endif Agreed, but how easy it is to fix a problem

Re: [sqlite] Bug in SQLite FLOAT values

2015-02-07 Thread Tim Streater
On 07 Feb 2015 at 05:57, Abdul Aziz abduldblog...@gmail.com wrote: *I think this is a bug, this means float values in sqlite will always be filled upto 11-12 decimal places, in any case, you will have to fill it, or sqlite will fill it itself with junk values, **this may create lot of

Re: [sqlite] Invalid column prefix returned in SELECT with joined subquery

2015-01-26 Thread Tim Streater
On 26 Jan 2015 at 12:23, Hick Gunter h...@scigames.at wrote: NO. Only if all of the following apply - you are parsing and/or displaying raw returned column names - your select contains more than one table (a table joined to itself counts as 2) - your tables have columns that share the same

Re: [sqlite] Invalid column prefix returned in SELECT with joined subquery

2015-01-26 Thread Tim Streater
On 26 Jan 2015 at 07:33, Hick Gunter h...@scigames.at wrote: It is never a good idea to rely on automatically assigned column names. If you want reproducible, predictable, release independant column names then please assign them with the AS clause. So you're saying that if I do: create

Re: [sqlite] Core dump with shared cache enabled

2015-01-23 Thread Tim Streater
On 22 Jan 2015 at 21:34, Daniel Roberts daniel.robe...@emc.com wrote: Attached is a core file (sorry I don’t have symbols) as well as a copy of the script I was running. Attachments are not allowed here. -- Cheers -- Tim ___ sqlite-users mailing

Re: [sqlite] Best Practice: Storing Dates

2015-01-15 Thread Tim Streater
On 14 Jan 2015 at 23:13, Simon Slavin slav...@bigfraud.org wrote: On 14 Jan 2015, at 10:40pm, Baruch Burstein bmburst...@gmail.com wrote: Of course, this is just at the theoretical level. As yo said, your app probably wouldn't need to worry about this. I think a previous poster had it

Re: [sqlite] Locking errors on network

2014-11-10 Thread Tim Streater
On 10 Nov 2014 at 18:22, Mike McWhinney elja...@sbcglobal.net wrote: So SQLite shouldn't be used at all on a network? Aren't there any other provisions to handled the locking errors if/when they occur? You tried setting a timeout as pointed to here? https://www.sqlite.org/faq.html#q5

Re: [sqlite] Locking errors on network

2014-11-10 Thread Tim Streater
On 10 Nov 2014 at 19:38, Mike McWhinney elja...@sbcglobal.net wrote: I am using Sqlite.NET client in C#. How would I go about defining a sqlite busy timeout handler? Is the API not documented somewhere (I don't know what Sqlite.NET client or C# are, so can't help)? Surely you must have some

Re: [sqlite] Installation_Procedure

2014-10-31 Thread Tim Streater
On 31 Oct 2014 at 03:38, Ayub Mytheen ayubmythee...@gmail.com wrote: I tried to configure SQLLite Setting in my laptop.i extract two zip file from your link. i tried to set path environment variable .We cant to configure to sqllite.if any body can help to guide how to configure sqllite.

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread Tim Streater
On 17 Oct 2014 at 10:39, Prakash Premkumar prakash.p...@gmail.com wrote: So the approach where we open the db with :memory: keyword does not provide durability. Why is that any sort of surprise? What you're opening is a database called :memory:. The string :memory: is the name of the

Re: [sqlite] An order by problem, maybe a bug?

2014-09-21 Thread Tim Streater
On 21 Sep 2014 at 16:18, James K. Lowden jklow...@schemamania.org wrote: Really? HM Revenue and Customs doesn't require you to distinguish between your given and family names once a year? Search me. As long as I get my tax adviser to file my tax return once a year, and send them dosh twice

Re: [sqlite] presentation about ordering and atomicity of filesystems

2014-09-13 Thread Tim Streater
On 13 Sep 2014 at 16:39, Richard Hipp d...@sqlite.org wrote: I say that a filesystem is an eventually-consistent key/value database. The keys are the filenames and the values are all big BLOBs, specifically the file content. Filesystems also have a hierarchical keyspace, which is an

Re: [sqlite] R-tree query regression, in SQLite library on latest Mac OS X beta

2014-09-11 Thread Tim Streater
On 11 Sep 2014 at 00:50, Simon Slavin slav...@bigfraud.org wrote: Don't worry too much about this. In the last count of an OS X version I counted seven different copies of SQLite being used in various places, integrated into programs, or as libraries, or as the shell tool. And these are

Re: [sqlite] Handling Timezones

2014-08-02 Thread Tim Streater
On 02 Aug 2014 at 00:27, Stephen Chrzanowski pontia...@gmail.com wrote: I understand that with routing and such, you can end up outside where you really are (With my IP, I'm shown just outside of Toronto when I'm actually two hours out), but the chances of showing up in Taiwan when you're in

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Tim Streater
On 23 Jul 2014 at 12:07, Richard Hipp d...@sqlite.org wrote: We are looking into adding hexadecimal integer literals to SQLite. In other words, we are looking to enhance SQLite to understand 0x1234 as another way of writing 4660. Hex literals are useful in conjunction with the bit-wise AND

Re: [sqlite] Sometimes when my process restarts, it returns error database is locked

2014-07-23 Thread Tim Streater
On 23 Jul 2014 at 19:43, Simon Slavin slav...@bigfraud.org wrote: -what line number or when was this issue first detected SQLite does not know how your application is organised. One particular API call returns the error, so you know where the error was found: it was by that call. I needed

Re: [sqlite] Importing a cvs file

2014-07-19 Thread Tim Streater
On 19 Jul 2014 at 19:06, Jonathan Leslie jlesli...@yahoo.com wrote: h'mmm never new about ascii 28-31 either.   I don't know why these things are kept a secret. They aren't, you've obviously never bothered to look at the ASCII table, which, oddly enough, can be found here:

[sqlite] I want to use CREATE TABLE ... AS SELECT ... - but what if the SELECT returns no rows?

2014-07-10 Thread Tim Streater
I have just noticed this syntax which will simplify some table creation for me. However in some instances where I want to use it, I have a handy SELECT available, but I don't want to actually insert a row at that time. Testing with the shell, the following appears to work: attach database

Re: [sqlite] I want to use CREATE TABLE ... AS SELECT ... - but what if the SELECT returns no rows?

2014-07-10 Thread Tim Streater
On 10 Jul 2014 at 11:20, Dan Kennedy danielk1...@gmail.com wrote: On 07/10/2014 04:45 PM, Tim Streater wrote: I have just noticed this syntax which will simplify some table creation for me. However in some instances where I want to use it, I have a handy SELECT available, but I don't want

Re: [sqlite] I want to use CREATE TABLE ... AS SELECT ... - but what if the SELECT returns no rows?

2014-07-10 Thread Tim Streater
On 10 Jul 2014 at 12:45, Simon Slavin slav...@bigfraud.org wrote: On 10 Jul 2014, at 11:47am, Clemens Ladisch clem...@ladisch.de wrote: This is indeed misleading. The result set actually has columns and column names even when there are now rows in it, so this is guaranteed to work even for

Re: [sqlite] I want to use CREATE TABLE ... AS SELECT ... - but what if the SELECT returns no rows?

2014-07-10 Thread Tim Streater
On 10 Jul 2014 at 14:17, Mark Lawrence no...@null.net wrote: On Thu Jul 10, 2014 at 01:52:00PM +0100, Tim Streater wrote: What I'm actually doing is moving/copying a row from one database to another, where the two databases have identical schemas. ... So there are two copy steps. What I'd

Re: [sqlite] Bug? sqlite3_column_name returns name of PK for rowid

2014-07-04 Thread Tim Streater
On 04 Jul 2014 at 11:43, Simon Slavin slav...@bigfraud.org wrote: On 3 Jul 2014, at 10:22pm, Martin Kleusberg mkleusb...@gmail.com wrote: I've encountered some odd behaviour when using the sqlite3_column_name function. Sorry, but column names are guaranteed only if you use an 'AS' clause

Re: [sqlite] Bug? sqlite3_column_name returns name of PK for rowid

2014-07-04 Thread Tim Streater
On 04 Jul 2014 at 15:35, Simon Slavin slav...@bigfraud.org wrote: On 4 Jul 2014, at 12:28pm, Tim Streater t...@clothears.org.uk wrote: On 04 Jul 2014 at 11:43, Simon Slavin slav...@bigfraud.org wrote: On 3 Jul 2014, at 10:22pm, Martin Kleusberg mkleusb...@gmail.com wrote: I've encountered

[sqlite] CAST vs. ROUND in ORDER BY

2014-06-22 Thread Tim Streater
I have a text column containing floating point strings like 23.6, 8.4, 0.3, etc. These always have just the one digit after the decimal point. This column was sometimes being used in an ORDER BY and then I realised that it wasn't going to sort properly. The use of a TEXT field was deliberate in

Re: [sqlite] CAST vs. ROUND in ORDER BY

2014-06-22 Thread Tim Streater
On 22 Jun 2014 at 10:08, Clemens Ladisch clem...@ladisch.de wrote: Tim Streater wrote: I have a text column containing floating point strings like 23.6, 8.4, 0.3, etc. These always have just the one digit after the decimal point. ... ORDER BY ROUND (myfield, 1); but now I see I could

Re: [sqlite] SQLite Database Browser officially moved to GitHub

2014-05-21 Thread Tim Streater
On 21 May 2014 at 00:17, RSmith rsm...@rsweb.co.za wrote: On 2014/05/20 23:37, Tim Streater wrote: Sorry, should have said I'm on OS X Mavericks 10.9.3. We know... no other OS would report CPU usage as 400%... :) :-) Well, to be fair, I don't know what OS X was reporting. I have iStat

Re: [sqlite] SQLite Database Browser officially moved to GitHub

2014-05-20 Thread Tim Streater
On 20 May 2014 at 14:11, jus...@postgresql.org wrote: Hi all, Just a small heads up. The old SQLite Database Browser project on SourceForge is officially on GitHub as of today, and we've made a new release (v3.1) as well. New website too (using GitHub pages): http://sqlitebrowser.org

Re: [sqlite] SQLite Database Browser officially moved to GitHub

2014-05-20 Thread Tim Streater
On 20 May 2014 at 14:11, jus...@postgresql.org wrote: http://sqlitebrowser.org https://github.com/sqlitebrowser/sqlitebrowser Sorry, should have said I'm on OS X Mavericks 10.9.3. -- Cheers -- Tim ___ sqlite-users mailing list

Re: [sqlite] cannot set connection while a datareader is active

2014-04-14 Thread Tim Streater
On 14 Apr 2014 at 15:14, Stefano Ravagni stefanorava...@gmail.com wrote: I would ask if you seen the screenshot i attached somes days ago because it show what happen Attachments are not allowed here. tim. ___ sqlite-users mailing list

Re: [sqlite] Bug with some combination of unique/partial indices

2014-04-13 Thread Tim Streater
On 13 Apr 2014 at 11:55, Richard Hipp d...@sqlite.org wrote: The UPDATE OR REPLACE also seems to be an essential component. The following simplified test case causes an assertion fault: CREATE TABLE t1(a,b); CREATE UNIQUE INDEX t1ab ON t1(a,b); CREATE INDEX t1b ON t1(b) WHERE b=1; I get

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Tim Streater
On 08 Apr 2014 at 00:13, Richard Hipp d...@sqlite.org wrote: On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian keith1christ...@gmail.comwrote: However, on production *nix machines, the path to the SQLite 'sar' will probably have to be absolute, or else the native 'sar' (System Activity

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Tim Streater
On 24 Mar 2014 at 08:36, Dominique Devienne ddevie...@gmail.com wrote: On Mon, Mar 24, 2014 at 6:23 AM, Roger Binns rog...@rogerbinns.com wrote: So you don't have to use it. Those of us who would rather proactively know about data corruption (to the best of SQLite's ability to detect it)

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Tim Streater
On 21 Mar 2014 at 01:06, Simon Slavin slav...@bigfraud.org wrote: On 20 Mar 2014, at 11:33pm, Richard Hipp d...@sqlite.org wrote: On Thu, Mar 20, 2014 at 7:18 PM, Tim Streater t...@clothears.org.uk wrote: I had a case where attempts to access a table in a user's db gave no such table

[sqlite] How good is pragma integrity_check

2014-03-20 Thread Tim Streater
I had a case where attempts to access a table in a user's db gave no such table, where 60 mins previously (according to the log) querying that table gave no problems. About a day and a half later the user's machine had what he described as a bad crash, so I'm suspecting he has a failing disk.

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Tim Streater
On 19 Mar 2014 at 00:53, Simon Slavin slav...@bigfraud.org wrote: 1) I start with $dbh = new sqlite3 ($dbname); Am I right in thinking that this does not explicitly open the db (and hence acquire a lock), but that the db is opened and the default lock (SQLITE_OPEN_READWRITE |

Re: [sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-19 Thread Tim Streater
On 19 Mar 2014 at 12:45, Simon Slavin slav...@bigfraud.org wrote: On 19 Mar 2014, at 11:21am, Tim Streater t...@clothears.org.uk wrote: So I could do: $dbh = new sqlite3 ($dbname, SQLITE_OPEN_READONLY); ?? Yes. I think that's the way you're meant to do it if you really do want readonly

[sqlite] Opening and closing an SQLITE3 db in PHP

2014-03-18 Thread Tim Streater
Part of my app will, at user request, read some data from an SQLite db and also some files from disk, and send it all out on the network. This may in some cases take several minutes, at the end of which the db gets updated here and there. While this is happening, the user may wish to do another

Re: [sqlite] sqlite3.exe file not produced by sqlite-autoconf-3080400.tar.gz on Cygwin

2014-03-11 Thread Tim Streater
On 11 Mar 2014 at 16:11, Keith Christian keith1christ...@gmail.com wrote: The resulting file is quite large, almost 14 times the size of the sqlite3 version 3.8.3 packages with Cygwin: ls -l /usr/bin/sqlite3.exe -rwxr-xr-x 1 kchris Domain Users 60957 Feb 4 04:45 /usr/bin/sqlite3.exe

Re: [sqlite] Making string changes in a table

2014-03-10 Thread Tim Streater
On 09 Mar 2014 at 22:48, Igor Tandetnik i...@tandetnik.org wrote: On 3/9/2014 6:37 PM, Tim Streater wrote: Dammit, I looked up and down for 'strlen' and passed over 'length'! I had been thinking about: update mytable set path='/path/from/' || substr(path, length('/path/to/') + 1

[sqlite] Making string changes in a table

2014-03-09 Thread Tim Streater
I have a table with one column containing file paths, such as /path/to/file and /path/to/my/otherfile. Now I want to change all entries where the path starts as /path/to/ to /path/from/. Getting a candidate list is easy, and I can then make the changes in PHP and rewrite the rows, but I

Re: [sqlite] Making string changes in a table

2014-03-09 Thread Tim Streater
On 09 Mar 2014 at 22:17, Igor Tandetnik i...@tandetnik.org wrote: On 3/9/2014 6:05 PM, Tim Streater wrote: I have a table with one column containing file paths, such as /path/to/file and /path/to/my/otherfile. Now I want to change all entries where the path starts as /path/to/ to /path/from

[sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
If I have a text column defined as it might be as MYCOL TEXT (that is with no default value), is there a way to distinguish in some row or other between a column into which no data has ever been entered, and a column that might have been set to a string, but later set to the empty string? (or

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 14:10, Simon Slavin slav...@bigfraud.org wrote: On 17 Feb 2014, at 11:37am, Tim Streater t...@clothears.org.uk wrote: If I have a text column defined as it might be as MYCOL TEXT (that is with no default value), is there a way to distinguish in some row or other between

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 17:01, Stephan Beal sgb...@googlemail.com wrote: FWIW, i have seen a similar problem in a legacy app which uses latin1 encoding in the DB. Latin1 doesn't always survive round-trip through PHP's JSON APIs. My case was similar to yours, and we eventually determined that the

Re: [sqlite] Text column: never used vs. set to empty string

2014-02-17 Thread Tim Streater
On 17 Feb 2014 at 18:38, Simon Slavin slav...@bigfraud.org wrote: On 17 Feb 2014, at 4:57pm, Tim Streater t...@clothears.org.uk wrote: Thanks. I should perhaps have made it clearer that I'm looking at an issue a user has. The application gathers some data from the user via a set of fields

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-11 Thread Tim Streater
On 11 Feb 2014 at 21:49, Stephen Chrzanowski pontia...@gmail.com wrote: I don't like the idea of letting the software decide what should be done based on a configuration file. The .sqliterc file already exists, so you're too late. Linux and Windows both can isolate processes from each other,

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-lineshell

2014-02-10 Thread Tim Streater
On 10 Feb 2014 at 19:25, Simon Slavin slav...@bigfraud.org wrote: I don't like the idea anyway. There should be no difference between double-clicking on an app and starting it by typing its name. I would go for: 1) Warning at startup if an in-memory db is being used 2) Add .save

Re: [sqlite] Avoiding holding a lock for too long

2014-02-08 Thread Tim Streater
On 07 Feb 2014 at 23:04, Simon Slavin slav...@bigfraud.org wrote: You should not be manually setting any handle to null. Try calling -finalize() on the statement and eventually -close() on the database, which do more than just setting their value. If you are setting anything to null

Re: [sqlite] Avoiding holding a lock for too long

2014-02-08 Thread Tim Streater
On 08 Feb 2014 at 17:48, Simon Slavin slav...@bigfraud.org wrote: On 8 Feb 2014, at 4:58pm, Tim Streater t...@clothears.org.uk wrote: I had a look at the PHP sqlite3 interface code, and it looks like -query does prepare, step, and reset (if there are no errors). If -query() is doing 'step

[sqlite] Avoiding holding a lock for too long

2014-02-07 Thread Tim Streater
I have some PHP code, roughly as follows (ignoring error handling): $dbh = new SQLite3 ('/path/to/mydb'); $res = $dbh-query ('select a,b,c from mytable where d=23'); // for example while (true) { $reg = $res-fetchArray (SQLITE3_ASSOC); if ($reg===false) break; //

[sqlite] Pragmas

2014-01-16 Thread Tim Streater
From time to time I see the use of a particular pragma recommended by the experts here. However, the introduction to: http://www.sqlite.org/pragma.html specifically warns that any pragma is at risk of being removed from one release to the next. And indeed, some are marked as deprecated. It

Re: [sqlite] Lightweight integrity_check?

2014-01-15 Thread Tim Streater
On 15 Jan 2014 at 19:20, Steven Fisher te...@me.com wrote: After opening, I want to do some basic checking of my database. I’m finding integrity_check much too slow for some of my users (especially with large amounts of data) but I don’t want to just blindly trust the database either. A

Re: [sqlite] Concrete example of corruption

2013-12-06 Thread Tim Streater
On 06 Dec 2013 at 03:31, Stephen Chrzanowski pontia...@gmail.com wrote: On a personal note, I still cannot fathom why anyone would WANT to do file management while working on an active document. Moving a document while its being worked on contradicts everything I understand. OT I find being

Re: [sqlite] Feature request: Better support for database file moving

2013-11-12 Thread Tim Streater
On 12 Nov 2013 at 13:49, Simon Slavin slav...@bigfraud.org wrote: Doesn't matter because OS X is, at heart, Unix. Unix is a bit weird in that it allows you to move and delete a file which is open. I wouldn't describe this as weird, it should be SOP for an OS, IMO. It's (one) of the things

Re: [sqlite] Feature request: Better support for database file moving

2013-11-12 Thread Tim Streater
On 12 Nov 2013 at 16:14, Stephen Chrzanowski pontia...@gmail.com wrote: **kind of off topic** @Tim I'm no where near in thinking that it should be SOP. I'm somewhat appreciative of not being allowed to change the file containers visual representation a file while something has its fingers

Re: [sqlite] Feature request: Better support for database file moving

2013-11-11 Thread Tim Streater
On 11 Nov 2013 at 15:36, Simon Slavin slav...@bigfraud.org wrote: On 11 Nov 2013, at 2:01pm, L. Wood lwoo...@live.com wrote: * A user could move the file during a transaction, i.e., between _prepare_v2(); and _finalize(); It seems that SQLite needs support for this situation. Would you

Re: [sqlite] SQLite Frontend?

2013-10-27 Thread Tim Streater
On 27 Oct 2013 at 18:29, Ulrich Goebel m...@fam-goebel.de wrote: What I'm looking for is a bash-like frontend for SQLite. The sqlite3 does in principle what I want, but to test queries it would be very nice to have a history of the commands entered, so the can be recalled an edidet later by

[sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Tim Streater
On 22 Oct 2013 at 09:11, Simon Slavin slav...@bigfraud.org wrote: If you are writing code specifically intended for use with SQLite (like your library was meant to be) then please use PHP's sqlite3 library rather than the PDO. The advantage of using PDO is that if you transfer from one DBMS

Re: [sqlite] Getting the row count when using the sqlite3 library

2013-10-23 Thread Tim Streater
On 23 Oct 2013 at 15:02, Simon Slavin slav...@bigfraud.org wrote: On 23 Oct 2013, at 1:15pm, Tim Streater t...@clothears.org.uk wrote: HmmmOK. I'm therefore making a second attempt to use the sqlite3 PHP interface in my application instead of PDO. There will be about 35 modules to alter so

Re: [sqlite] Problem with method numRows() in Sqlite3

2013-09-23 Thread Tim Streater
On 23 Sep 2013 at 04:50, pisey phon phonpise...@gmail.com wrote: I got an error Call to undefined method SQLite3Result::numRows(). and here is my code: $db = new Sqlite3(sample.db); $result = $db-query(select * from table); $rows = $result-numRows(); Don't do that. Do: $rows = count

Re: [sqlite] Problem with method numRows() in Sqlite3

2013-09-23 Thread Tim Streater
On 23 Sep 2013 at 04:50, pisey phon phonpise...@gmail.com wrote: I got an error Call to undefined method SQLite3Result::numRows(). and here is my code: $db = new Sqlite3(sample.db); $result = $db-query(select * from table); $rows = $result-numRows(); Sorry, ignore my last mail. DO this:

Re: [sqlite] A graphical tool to handle sqlite schema change(more than ALTER TABLE)

2013-09-18 Thread Tim Streater
On 18 Sep 2013 at 01:49, niubao niuba...@gmail.com wrote: Is there a tool that allows you to graphically change sqlite schema as simple as editing a spreadsheet? For example if I wanted to change a column name from my_driving_hours to driving_time, instead of writing a line of code, I can

Re: [sqlite] Question about date time

2013-09-15 Thread Tim Streater
On 15 Sep 2013 at 18:13, William Drago wdr...@suffolk.lib.ny.us wrote: All, Should I put date and time in separate columns if I want to select by time? For example: SELECT * FROM testresults WHERE (status != Pass) AND (23:00 = testtime) AND (testtime = 01:00). I have been reading the

Re: [sqlite] Hints for the query planner

2013-09-10 Thread Tim Streater
On 10 Sep 2013 at 20:26, Richard Hipp d...@sqlite.org wrote: SURVEY QUESTION: The question for today is what to call this magic hint function: (1) unlikely(EXPR) (2) selective(EXPR) (3) seldom(EXPR) (4) seldom_true(EXPR) (5) usually_not_true(EXPR) Please feel free to suggest other

Re: [sqlite] SQLite and integer division 1/2=0

2013-05-12 Thread Tim Streater
On 12 May 2013 at 19:15, Paul van Helden p...@planetgis.co.za wrote: I can live with SELECT 1/2 vs SELECT 1.0/2. The problem is that there is no way to specify a float when you insert into a NUMERIC. 1.0 turns into an integer. Then you do a division on all rows with an SQL select and you get

Re: [sqlite] Problem getting utf-8 text out of a text column

2013-03-22 Thread Tim Streater
On 21 Mar 2013 at 23:30, Richard Hipp d...@sqlite.org wrote: On Thu, Mar 21, 2013 at 6:52 PM, Tim Streater t...@clothears.org.uk wrote: I have a column defined as TEXT and I insert utf-8 text into it. In particular, there are byte sequences that might look as follows: ... 74 6F 20 C2 A3 32

[sqlite] Problem getting utf-8 text out of a text column

2013-03-21 Thread Tim Streater
I have a column defined as TEXT and I insert utf-8 text into it. In particular, there are byte sequences that might look as follows: ... 74 6F 20 C2 A3 32 35 30 ... (in hex) which represents: ... to £250 ... I used Navicat for SQLite Lite to peer at the data as hex and text in the column, and it

Re: [sqlite] Problem getting utf-8 text out of a text column

2013-03-21 Thread Tim Streater
Simon, Thanks for the suggestions. I should have mentioned that I'm running under OS X so I have the sqlite3 application and can easily do the tests you suggest. But that'll have to be tomorrow - time for shuteye now :-) Cheers -- tim ___

Re: [sqlite] Full covering index without table

2013-03-05 Thread Tim Streater
On 05 Mar 2013 at 15:05, Richard Hipp d...@sqlite.org wrote: Both implementations allow for reading just the prefix of the content blob in order to access earlier fields of a table, leaving the tail of the blob unread on disk. So in all cases, it pays to put your frequently accessed small

Re: [sqlite] SQLite on a Mac: PHP doesn't know about :-(

2013-02-22 Thread Tim Streater
On 22 Feb 2013 at 20:51, Didier Morandi didier.mora...@gmail.com wrote: very reason why noone (but Geeks) will ever move from VBScript to PowerShell. Richard, I will not start learning OOP at 62 to be able to use SQLite. Sorry for that. I'll stick to MySQL and good old procedural PHP. Not

Re: [sqlite] SQLite Native in PHP in the future?

2013-01-13 Thread Tim Streater
On 13 Jan 2013 at 10:17, Tracy Rohan tro...@rohanone.com wrote: Hi, I read that SQLite may not be native in PHP in the future? When I say native, I mean that platform/devices will need to install SQLite as an extension before it will function (as it was previously). Is this true? Why not

Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Tim Streater
On 06 Jan 2013 at 17:11, Simon Slavin slav...@bigfraud.org wrote: On 6 Jan 2013, at 5:09pm, Richard Hipp d...@sqlite.org wrote: I am a Windows VISTA Home Basic 2007 user who needs some help, please. Every time I turn on my PC, Windows tells me the SQLITE3.DLL file is missing. If you have

Re: [sqlite] sqlite3.dll missing, HELP please :)

2013-01-06 Thread Tim Streater
On 06 Jan 2013 at 22:41, Simon Slavin slav...@bigfraud.org wrote: On 6 Jan 2013, at 7:39pm, Tim Streater t...@clothears.org.uk wrote: On 06 Jan 2013 at 17:11, Simon Slavin slav...@bigfraud.org wrote: On 6 Jan 2013, at 5:09pm, Richard Hipp d...@sqlite.org wrote: I am a Windows VISTA Home

Re: [sqlite] String not valid DateTime

2012-12-10 Thread Tim Streater
On 10 Dec 2012 at 14:05, William Drago wdr...@suffolk.lib.ny.us wrote: I am using SQLite with C# and am having trouble with SQLite DATETIME types. The following error occurs when trying to read rows from a table that contains dates (e.g. 12/09/2012 22:51:24). (I am using a SQLiteDataReader to

Re: [sqlite] SQLite logo usage

2012-12-10 Thread Tim Streater
On 10 Dec 2012 at 14:40, Simon Slavin slav...@bigfraud.org wrote: On 10 Dec 2012, at 2:38pm, Richard Hipp d...@sqlite.org wrote: The SQLite name and the new SQLite Logo are registered trademarks. Let's ask it a different way. If I write something and want to list SQLite as one of the

Re: [sqlite] SQLite converts all unicode characters into ANSI

2012-11-19 Thread Tim Streater
On 19 Nov 2012 at 01:57, ZikO ze...@op.pl wrote: The script looks like this: CREATE TABLE IF NOT EXISTS imiona ( id INTEGER PRIMARY KEY, data TEXT, imie1 TEXT, imie2 TEXT, imie3 TEXT); INSERT INTO imiona (data,imie1,imie2,imie3) VALUES

[sqlite] Right way to store binary data into a blob

2012-10-03 Thread Tim Streater
I've got a temporary database with a blob column. I'm using the PHP PDO interface, and I'd like to store some binary data into the blob; it's actually an image. Later I'm going to read it back and write it to disk. What's the right way to get the data into the column? At the moment I'm using

Re: [sqlite] Right way to store binary data into a blob

2012-10-03 Thread Tim Streater
On 03 Oct 2012 at 10:50, Clemens Ladisch clem...@ladisch.de wrote: Tim Streater wrote: What's the right way to get the data into the column? 1) Use SQLite blob literals, which are hex strings with an x prefix: ... set imagedata = x'ffd8ffe000104a46...' where ... 2) Use parameters

Re: [sqlite] sqlite Unofficial poll

2012-09-23 Thread Tim Streater
On 23 Sep 2012 at 11:37, Baruch Burstein bmburst...@gmail.com wrote: I am curious about the usefulness of sqlite's unique type handling, and so would like to know if anyone has ever actually found any practical use for it/used it in some project? I am referring to the typeless handling, e.g.

Re: [sqlite] sqlite select max(field1), field2 from table1

2012-09-12 Thread Tim Streater
On 12 Sep 2012 at 11:37, Richard Hipp d...@sqlite.org wrote: On Wed, Sep 12, 2012 at 6:15 AM, Bart Smissaert bart.smissa...@gmail.comwrote: Had a look at the new option as in the SQL above. Noticed it will only return one record, even if there are more records where field1 equals

Re: [sqlite] How to build a new sqlite3.dylib?

2012-08-06 Thread Tim Streater
On 04 Aug 2012 at 11:54, Tobias Giesen tobiasgie...@gmail.com wrote: I was able to compile the sqlite3 shell, but how to create the latest dylib, or where can I download it? I use xcode for this purpose, using the amalgamation. -- Cheers -- Tim

Re: [sqlite] How to build a new sqlite3.dylib?

2012-08-06 Thread Tim Streater
On 06 Aug 2012 at 22:49, Simon Slavin slav...@bigfraud.org wrote: On 6 Aug 2012, at 10:29pm, Tobias Giesen tobiasgie...@gmail.com wrote: would you be willing to share your dylib with me? I don't know how to do this with Xcode. Do you absolutely need to use a dynamic library ? The

Re: [sqlite] How to compile and load the example fts4 rank function?

2012-07-21 Thread Tim Streater
On 21 Jul 2012 at 17:51, Pavel Ivanov paiva...@gmail.com wrote: On Sat, Jul 21, 2012 at 3:36 AM, AJ ONeal coola...@gmail.com wrote: I naively tried wget https://raw.github.com/gist/3154964/d570955d45580c095c99de6eb0c378395d4b076d/ sqlite3-fts4-rank.c gcc -c sqlite3-fts4-rank.c -o

Re: [sqlite] EXT :Re: Can't create empty database

2012-06-25 Thread Tim Streater
On 25 Jun 2012 at 14:30, Niall O'Reilly niall.orei...@ucd.ie wrote: On 25 Jun 2012, at 13:24, Black, Michael (IS) wrote: Does the shell compile differently for Mac? Sorry. I've no idea whether it does. SQLite comes bundled with OSX and I haven't had a need to build it from

[sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
I'd like to delete multiple rows using the following syntax, but experiment appears to show that at most one row is deleted. I tried the following: delete from addressbook where absid=(select personnick from grouplinks where groupnick='27') The 'select personnick ...' can return zero, one,

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
On 27 Apr 2012 at 21:03, Stephan Beal sgb...@googlemail.com wrote: On Fri, Apr 27, 2012 at 10:00 PM, Tim Streater t...@clothears.org.uk wrote: delete from addressbook where absid=(select personnick from grouplinks where groupnick='27') i think what you want is IN instead of =. Stephan

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
On 27 Apr 2012 at 22:16, Simon Slavin slav...@bigfraud.org wrote: On 27 Apr 2012, at 9:00pm, Tim Streater t...@clothears.org.uk wrote: delete from addressbook where absid=(select personnick from grouplinks where groupnick='27') The 'select personnick ...' can return zero, one, or many

Re: [sqlite] sqlite3 column widths

2012-04-25 Thread Tim Streater
On 25 Apr 2012 at 17:36, Pete p...@mollysrevenge.com wrote: So I guess that's a No then? I'm fully aware of how sqlite3 treats datatypes and column width specifications, but surely if someone defines a column with a specific max width, it's reasonable to assume that's the max width they

Re: [sqlite] make sqlite3_analyzer No rule to make target `sqlite3_analyzer'. Stop.

2012-03-30 Thread Tim Streater
On 30 Mar 2012 at 04:11, vaiStardom paul.a...@me.com wrote: I can't seem to use the sqlite3_analyzer on my MacBook Pro 2010 i7. Following the instructions in the book 'The Definitive Guide To Sqlite', to analyze the test.db all I have to do is issue the command 'sqlite3_analyzer test.db'.

Re: [sqlite] Manual

2012-03-03 Thread Tim Streater
On 03 Mar 2012 at 15:15, Mark Schonewille m.schonewi...@economy-x-talk.com wrote: MySQL has a really great manual with extensive explanations and dozens of examples for each command. SQLite is none of all this. It just has a limited number of pages listing a small number of commands and some

Re: [sqlite] Manual

2012-03-03 Thread Tim Streater
On 03 Mar 2012 at 15:57, Mark Schonewille m.schonewi...@economy-x-talk.com wrote: Could you just tell me where I find a good on-line manual? Thanks. I'm not aware of any similar to the mysql one - but perhaps I haven't looked particularly. But you didn't answer my question about the

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-10 Thread Tim Streater
On 10 Feb 2012 at 07:55, bhaskarReddy uni...@gmail.com wrote: PRAGMA table_info(yourtablename); will display colNumber, colName, colType, ex: 0|slotId|INTEGER|0||0 1|ponChannelId|INTEGER|0||0 2|onuType|INTEGER|0||0 3|onuSerialNumber|TEXT|0||0 4|onuId|INTEGER|0||0

Re: [sqlite] Query on Sqlite3 in an Android app

2012-02-09 Thread Tim Streater
On 09 Feb 2012 at 15:40, Lavanya Ramanan lavanyacoo...@gmail.com wrote: And I would also like to know what GUI do people generally use for sqlite database. Navicat for SQLite Lite, although I rarely need to use it. Very occasionally I want to see the hex of some database column. -- Cheers

Re: [sqlite] ALTER TABLE

2012-02-06 Thread Tim Streater
On 06 Feb 2012 at 19:31, Ryan Johnson ryan.john...@cs.utoronto.ca wrote: On 06/02/2012 1:59 PM, Bill McCormick wrote: The order is not important. What is important is that I come up with some way to manage version updates. I've tried doing something similar in the past using an alter tables

Re: [sqlite] Is there any API for counting number of rows in a particular table.

2012-01-31 Thread Tim Streater
On 30 Jan 2012 at 21:58, Bart Smissaert bart.smissa...@gmail.com wrote: OK, so how you open those then with SQLiteRoot? I use PHP, thus: $dbh = new PDO (sqlite: . $db); where $db is a string like /path/to/database. I don't know what SQLiteRoot is although possibly I should do. --

Re: [sqlite] Is there any API for counting number of rows in a particular table.

2012-01-30 Thread Tim Streater
On 30 Jan 2012 at 16:37, Bart Smissaert bart.smissa...@gmail.com wrote: How do you make it open database files that have an extension other than .slt? Eh? None of my SQLite databases has any extension at all. -- Cheers -- Tim ___ sqlite-users

Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-24 Thread Tim Streater
On 24 Jan 2012 at 20:02, Joe Winograd j...@winograd.us wrote: Thanks for the idea, but it will not install. The way this group operates with excessive trimming/snipping ... No it doesn't. It doesn't do *enough* trimming and snipping, and as a result our inboxes grow exponentially. If I want

Re: [sqlite] insert image into db - windows batch

2012-01-18 Thread Tim Streater
On 18 Jan 2012 at 15:24, Petr Lázňovský la...@volny.cz wrote: Sorry, 'windows batch' doesn't mean anything to me. http://en.wikipedia.org/wiki/Batch_file but wikipedia is reasonlessly turned off today Looks like you can get round this (at least on OS X / Safari 5.1) by pressing the

Re: [sqlite] insert image into db - windows batch

2012-01-18 Thread Tim Streater
On 18 Jan 2012 at 15:24, Petr Lázňovský la...@volny.cz wrote: Sorry, 'windows batch' doesn't mean anything to me. http://en.wikipedia.org/wiki/Batch_file but wikipedia is reasonlessly turned off today ___ sqlite-users mailing list

Re: [sqlite] sql/tcl script

2012-01-16 Thread Tim Streater
On 16 Jan 2012 at 18:15, Stephan Beal sgb...@googlemail.com wrote: On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick wpmccorm...@gmail.comwrote: Is tcl the only scripting interface for SQLite? I'm just wondering what the options are. There are few scripting languages which don't have an

  1   2   >