On 22 Oct 2013 at 09:11, Simon Slavin 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
On 23 Sep 2013 at 04:50, pisey phon 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
On 23 Sep 2013 at 04:50, pisey phon 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:
On 18 Sep 2013 at 01:49, niubao 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
>
On 15 Sep 2013 at 18:13, William Drago 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
On 10 Sep 2013 at 20:26, Richard Hipp 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
On 12 May 2013 at 19:15, Paul van Helden 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
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
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
___
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
On 05 Mar 2013 at 15:05, Richard Hipp 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
>
On 22 Feb 2013 at 20:51, Didier Morandi 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.
On 13 Jan 2013 at 10:17, Tracy Rohan 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
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, Ric
On 06 Jan 2013 at 17:11, Simon Slavin wrote:
> On 6 Jan 2013, at 5:09pm, Richard Hipp 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.
>
On 10 Dec 2012 at 14:40, Simon Slavin wrote:
> On 10 Dec 2012, at 2:38pm, Richard Hipp 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
>
On 10 Dec 2012 at 14:05, William Drago 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
On 19 Nov 2012 at 01:57, ZikO 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
>
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'ffd8
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
On 23 Sep 2012 at 11:37, Baruch Burstein 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,
On 12 Sep 2012 at 11:37, Richard Hipp wrote:
> On Wed, Sep 12, 2012 at 6:15 AM, Bart Smissaert
> wrote:
>
>> 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
On 06 Aug 2012 at 22:49, Simon Slavin wrote:
> On 6 Aug 2012, at 10:29pm, Tobias Giesen 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 ?
On 04 Aug 2012 at 11:54, Tobias Giesen 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
On 21 Jul 2012 at 17:51, Pavel Ivanov wrote:
> On Sat, Jul 21, 2012 at 3:36 AM, AJ ONeal wrote:
>> I naively tried
>>
>> wget
>> https://raw.github.com/gist/3154964/d570955d45580c095c99de6eb0c378395d4b076d/
>> sqlite3-fts4-rank.c
>> gcc -c
On 25 Jun 2012 at 14:30, Niall O'Reilly 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
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 'sele
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'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,
On 25 Apr 2012 at 17:36, Pete 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
On 30 Mar 2012 at 04:11, vaiStardom 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
>
On 03 Mar 2012 at 15:57, Mark Schonewille
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
On 03 Mar 2012 at 15:15, Mark Schonewille
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
On 10 Feb 2012 at 07:55, bhaskarReddy 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
>
On 09 Feb 2012 at 15:40, Lavanya Ramanan 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.
--
On 06 Feb 2012 at 19:31, Ryan Johnson 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
On 30 Jan 2012 at 21:58, Bart Smissaert 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.
On 30 Jan 2012 at 16:37, Bart Smissaert 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
On 24 Jan 2012 at 20:02, Joe Winograd 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
On 18 Jan 2012 at 15:24, Petr Lázňovský 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
On 18 Jan 2012 at 15:24, Petr Lázňovský 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
On 16 Jan 2012 at 18:15, Stephan Beal wrote:
> On Mon, Jan 16, 2012 at 7:12 PM, Bill McCormick wrote:
>
>> Is tcl the only scripting interface for SQLite? I'm just wondering what
>> the options are.
> There are few scripting languages which don't
On 15 Jan 2012 at 20:44, Bill McCormick wrote:
> What is the problem with the shared lib stuff?
>
> Thanks!!
> Black, Michael (IS) wrote, On 1/15/2012 2:27 PM:
>> A simple one -- and please compile sqlite3.c into your program and make
>> everybody happy.
>>
>> Forget the
On 21 Dec 2011 at 18:32, smallboat wrote:
> I have a sqlite file. I would like to open it and know how many tables in it.
>
> What is the command line to open a sqlite file and get to know how many tables
> in it? Thanks.
See:
http://www.sqlite.org/sqlite.html
and:
My db has a column called "status". This can take one of 7 or so integer values
from 0 to 7 or so. There are times when I need a quick answer to this question:
are there any rows in the db for which status has value 0. I don't need to know
how many, just whether there are any or not. What's the
On 03 Nov 2011 at 14:02, Simon Slavin wrote:
> On 3 Nov 2011, at 1:38pm, Paxdo Presse wrote:
>
>> How did you get concurrent connections? (about)
>
> This is related specifically to the web language I use (PHP) so it won't help
> you if you're using something else.
>
>
On 27 Oct 2011 at 22:04, Kees Nuyt <k.n...@zonnet.nl> wrote:
> On Thu, 27 Oct 2011 21:47:17 +0100, Simon Slavin
> <slav...@bigfraud.org> wrote:
>
>>
>> On 27 Oct 2011, at 8:12pm, Tim Streater wrote:
>>
>>> Is there a way to get a unique id from a
Is there a way to get a unique id from a database without actually creating a
new row? If I have:
create table mytab (i integer primary key, j);
then I could do (pseudo-code):
insert into mytab (i) values (null);
x = result of (select last_insert_rowid() from mytab;);
for (n=0; n
On 22 Oct 2011 at 18:25, saeed ahmed wrote:
> i want a software,something like microsoft's Access but no microsoft.a
> software that can be used for making tables,queries and reports.
Try Navicat for SQLite Lite (free).
--
Cheers -- Tim
On 17 Oct 2011 at 10:00, Jean-Christophe Deschamps wrote:
> At least it would gives a fairly good hint as to what to look for and
> where to look. You know that some extension function was passed an
> out-of-range argument during the course of the last operation. From
>
On 13 Oct 2011 at 16:59, Filip Navara wrote:
> Reproduced on Windows, SQLite 3.7.8.
Seems OK here, OS X 10.7.2:
Second-Mini% sqlite3 wiggy
-- Loading resources from /Users/tim/.sqliterc
SQLite version 3.7.5
Enter ".help" for instructions
Enter SQL statements terminated
Looking at the description text for sqlite3_exec (SQLite C interface), I see
this text:
"The sqlite3_exec() interface runs zero or more UTF-8 encoded,
semicolon-separate SQL statements passed into its 2nd argument, in the context
of the database connection passed in as its 1st argument."
Now,
On 09 Oct 2011 at 17:00, Simon Slavin <slav...@bigfraud.org> wrote:
> On 9 Oct 2011, at 4:52pm, Tim Streater wrote:
>
>> At present, I'm using PDO and setting it to throw exceptions. So I have a
>> try/catch around all my $dbh->query and in there, log what ha
On 09 Oct 2011 at 02:02, Simon Slavin <slav...@bigfraud.org> wrote:
> On 9 Oct 2011, at 1:39am, Tim Streater wrote:
>
>> On 08 Oct 2011 at 23:32, Simon Slavin <slav...@bigfraud.org> wrote:
>>
>>> I'm not clear whether you're using the PDO or the sqlite3 ext
On 09 Oct 2011 at 10:40, saeed ahmed wrote:
> i am a new to sqlite. i want to know how can i make sqlite looking like
> microsoft access? similar working environment, like making tables, queries
> etc. actually i find it difficult to work in writing commands mode. any
On 08 Oct 2011 at 23:32, Simon Slavin <slav...@bigfraud.org> wrote:
> On 8 Oct 2011, at 10:37pm, Tim Streater wrote:
>
>> I have this string:
>>
>> attach database ':memory:' as mem; create table mem.messages ( absid
>> integer, ..., replyto text );
On 08 Oct 2011 at 23:32, Simon Slavin <slav...@bigfraud.org> wrote:
> On 8 Oct 2011, at 10:37pm, Tim Streater wrote:
>
>> I have this string:
>>
>> attach database ':memory:' as mem; create table mem.messages ( absid
>> integer, ..., replyto text );
I have this string:
attach database ':memory:' as mem; create table mem.messages ( absid
integer, ..., replyto text );
(where the ellipsis represents a number of other column declarations). In PHP,
I do this:
$dbh->query ($str);
where $str contains the string from above. It completes
On 28 Sep 2011 at 00:25, Richard Hipp <d...@sqlite.org> wrote:
> On Tue, Sep 27, 2011 at 7:16 PM, Tim Streater <t...@clothears.org.uk> wrote:
>
>> On 27 Sep 2011 at 18:15, Richard Hipp <d...@sqlite.org> wrote:
>>
>>> On Tue, Sep 27, 2011 at 1:13 PM,
On 27 Sep 2011 at 18:15, Richard Hipp <d...@sqlite.org> wrote:
> On Tue, Sep 27, 2011 at 1:13 PM, Tim Streater <t...@clothears.org.uk> wrote:
>
>> The databases that get vacuumed tend to have a fair amount of traffic in
>> and out. So it's good to compress them
On 27 Sep 2011 at 12:23, Simon Slavin <slav...@bigfraud.org> wrote:
> On 27 Sep 2011, at 10:49am, Tim Streater wrote:
>
>> On 27 Sep 2011 at 00:19, Simon Slavin <slav...@bigfraud.org> wrote:
>>
>>> I believe that VACUUM is one of the statements which cou
On 27 Sep 2011 at 00:19, Simon Slavin <slav...@bigfraud.org> wrote:
> On 26 Sep 2011, at 11:32pm, Tim Streater wrote:
>> But, very often the database on which the error occurs is :memory: - and I
>> guess each thread will have its own one of those.
>
> Are you doin
On 27 Sep 2011 at 00:19, Simon Slavin <slav...@bigfraud.org> wrote:
> On 26 Sep 2011, at 11:32pm, Tim Streater wrote:
>
>> For the most part it's going to be SELECT, INSERT, UPDATE, BEGIN, COMMIT.
>> Less often, there's VACUUM. Let me have a look at my logs - OK, when
On 26 Sep 2011 at 22:40, Simon Slavin <slav...@bigfraud.org> wrote:
> On 26 Sep 2011, at 10:30pm, Tim Streater wrote:
>> My question now is, if two or more PHP scripts are competing for access to
>> the same database, is "database schema has changed" a possible ou
Thinking some more about the occasional instances of "database schema has
changed" that I experience, I took a look through the amalgamation to see where
this error might be being detected. Reading the code and the comments I'm
reminded of something I keep forgetting: that SQLite has no server.
On 23 Sep 2011 at 11:18, Mirek Suk wrote:
> Dne 23.9.2011 4:41, Igor Tandetnik napsal(a):
>> Note that I didn't say it was wise to store NUL characters as part of the
>> string - I only said that you could do it if you wanted to. sqlite3_bind_text
>> takes the length
On 15 Sep 2011 at 18:21, Jay A. Kreibich wrote:
> On Thu, Sep 15, 2011 at 11:13:57AM -0500, Puneet Kishor scratched on the wall:
>
>> While your suggested documentation won't harm, and will likely help,
>> actually the above does suggest to me a short-circuit-ish kind of
>>
On 13 Sep 2011 at 17:03, Simon Slavin <slav...@bigfraud.org> wrote:
> On 13 Sep 2011, at 4:38pm, Tim Streater wrote:
>
>> In general the row could get moved around any number of databases and then
>> back to the original one.
>
> That's one reason I think mak
On 13 Sep 2011 at 13:04, Simon Slavin <slav...@bigfraud.org> wrote:
> On 13 Sep 2011, at 12:13pm, Tim Streater wrote:
>
>> SQLite error: general code: HY000 error: 17, database schema has changed
>>
>> and since all the rest of the time the code works fine I'm
About once every few months I get this error (under OS X 10.7.1):
SQLite error: general code: HY000 error: 17, database schema has changed
and since all the rest of the time the code works fine I'm having some trouble
pinning down whether it's my bug (more likely) and if so where, or an
On 02 Sep 2011 at 16:58, Stephan Beal wrote:
> On Fri, Sep 2, 2011 at 5:32 PM, Frans Knibbe wrote:
>
>> If SQLite could log this statement including the comment, it would still be
>> possible to distinguish sources. Or reject the logging of
On 31 Aug 2011 at 23:24, Igor Tandetnik <itandet...@mvps.org> wrote:
> On 8/31/2011 5:56 PM, Tim Streater wrote:
>> In the above, each database is newly created as shown. What I had
>> forgotten to do was to create the "test" table in the second database
>>
Today when trying to copy from one database to another, I had the following
error (simplified example below):
Second-Mini% sqlite3 test1
sqlite> create table test (absid integer primary key, otherfield integer);
sqlite> insert into test (absid,otherfield) values (null, 10);
sqlite>
At 14:56 -0400 08/10/08, Igor Tandetnik wrote:
>Shaun R. <[EMAIL PROTECTED]> wrote:
>> Anybody help me out here, trying to grab column info based on the
>> columns name. Examples i keep seeing people seam to use the colunm
>> number but cant you access these values by the name?
>
>Not in
If I'm doing, as it might be, the following in PHP:
$dbh = new PDO ("sqlite:mydb");
$res1 = $dbh->query ("select ...");
$res11 = $res1->fetchAll (PDO::FETCH_ASSOC);
Does anyone know at what point the variable $res1 becomes free for
re-use? Is it immediately after the assignment to $res11
The precompiled binary of the command line program for OS X appears not to have
been built with a readline library. Is there any particular reason for this?
(the version supplied with OS X Leopard (3.4.0), is so complied.
Thanks,
-- Tim
___
At 15:39 14/07/2008, John LeSueur wrote:
>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 i
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 database file"
(having done the read OK
first).
The database has permissions
If I have something like the following PHP:
$dbh = new PDO ("sqlite:" . $somename);
$resq = $dbh->query ("select * from some_table");
$rest = $resq->fetchAll ();
then do I need to do any cleanup on $resq before re-using it, such as setting
to NULL (seems to be recommended for reuse of $dbh)?
At 18:02 03/07/2008, Simon Davies wrote:
>Hi Tim,
>
>select count(*) from sqlite_master;
>
>will return 0 on a brand new db
>
>Rgds,
>Simon
Thanks - that's a handy pointer.
At 18:04 03/07/2008, Igor Tandetnik wrote:
>Tim Streater <[EMAIL PROTECTED]>
>wro
Hi,
I have a PHP script that I run in Terminal under OS X, which opens an sqlite db
and works on it. Trouble is, if the db doesn't exist then the PHP library
silently creates an empty db with the given name. Given this, I need to detect
that the empty db has
been created, delete it, and exit.
201 - 281 of 281 matches
Mail list logo