guess you missed all the smileys and innuendo in that reply then.
On 5/8/07, Glenn <[EMAIL PROTECTED]> wrote:
Essien Essien wrote:
> that was really funny you know :)
And your response was really obnoxious. You could have simply said that
the common way to do things on POSIX is "./configure; m
There was a change of file structure with version 3.x.x
and this is described in the documentation under Version 3
Overview.
You are attempting to use Sqlite3 on a version 2.8.x database
and the formats are not compatible.
On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:
>I've gone throug
Ive been getting SQLITE_MISUSE errors after calling sqlite3_step one
more time than required. Im using sqlite3_prepare_v2 so im expecting
detailed error messages, but when i call sqlite3_errmsg all i seem to
get is "not an error".
So my question is this. What is an error ? It seems a little
co
What user is httpd running as? Enter:
ps aux | grep -v grep | grep httpd
Does that user (typically 'nobody') have permission to access the file
at your: /home/xxx/data/xxx.db ?
On 5/9/07, Brandon Eley <[EMAIL PROTECTED]> wrote:
I've gone through a few tutorials and can't seem to get this ri
That worked as hoped. (Used your sqlite3_exec() version.) Thanks.
On 5/9/07, Michael Ruck <[EMAIL PROTECTED]> wrote:
Just call sqlite3_exec with the proper ATTACH as you would on the command
line. (Of course you could also do a prepare/step/finalize, but for ATTACH
sqlite3_exec is enough.)
Exa
>
>The use of sqlite3_bind_blob() for this is MUCH faster, and
>surely requires less code. May I ask for more detail on why
>you chose to generate SQL statements with huge blob literals?
I'm also doing sqlite networked, so all the bits have to
be encoded and transmitted anyway. Not using blobs
Rich Shepard wrote:
On Wed, 9 May 2007, John Stanton wrote:
That program does have the capability, but may not be implemented that
way on Windows. Why not make the change yourself?
A.J.Millan wrote:
As a suggestion, and even in the risk to abuse of Mr Hipp's patience.
Would
it be possible
Dave Dyer <[EMAIL PROTECTED]> wrote:
> I've recently been storing images in Sqlite datbases, and
> for various reasons don't want to use the normal "blob"
> mechanisms. Consequently, a 10mb JPG image file would be
> encoded as slightly larger than 10mb sqlite "insert xx" command.
>
The use of sq
I've recently been storing images in Sqlite datbases, and
for various reasons don't want to use the normal "blob"
mechanisms. Consequently, a 10mb JPG image file would be
encoded as slightly larger than 10mb sqlite "insert xx" command.
The size of the commands required by this method is limited
I've gone through a few tutorials and can't seem to get this right.
I've had my web host install the PECL extension and the following is
what is in my phpinfo();
sqlite
SQLite support enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
12:25:33 wez Exp $
SQLite Library
I'm looking for an upper bound on how big legitimate
SQL statements handed to SQLite get to be. I'm not
interested in contrived examples. I want to see
really big SQL statements that are actually used in
real programs.
"Big" can be defined in several ways:
* Number of bytes of text in the
Just call sqlite3_exec with the proper ATTACH as you would on the command
line. (Of course you could also do a prepare/step/finalize, but for ATTACH
sqlite3_exec is enough.)
Example:
sqlite3 *db = NULL;
/* ... */
sqlite3_exec(db, "ATTACH DATABASE 'filename' AS dbname", NUL
Simpler than that. I merely want to attach to two databases (files).
flash.db contains a set of tables that hold non-volatile data; ram.db
contains a set of tables that is re-built (volatile) on re-boot -- but
offers fast, read-only access. No table-name overlaps, of course.
I want to access bo
On further inspection of your code fragment, it appears you aren't really
using (extra) attached databases, but merely specifying an alternative file
to use if the first file is not available. Calling sqlite3_close(...) will
do the right thing, by closing the actual database that succeeded in
op
From the comments around the attach function, you'd have to execute a SQL
statement "attach database x as y KEY z". I assume that 'key Z' is for the
encrypting version of SQLite3 distributed by drh.
/*
** An SQL user-function registered to do the work of an ATTACH statement.
The
** three argume
Can one attach multiple database files using C API? The only example
I've seen is CLI-based (using ATTACH). The Owens book seems to hint
that it's possible to do the same trick using sqlite3_open()...
Quote Pgs. 206-207:
This is more of a connection handle than a database handle since it is
pos
It would appear that by using bind variables instead of '%Q' in the SQL
string, the need for sqlite3_encode_binary and sqlite3_decode_binary is
eliminated. Is that indeed the case?
--andy
* Ed Pasma <[EMAIL PROTECTED]> [2007-05-07 10:28]:
> This solution may is tricky but has occasoinaly helped me. It
> is written here dedicated for the example data. For real data
> the leftpadding should likely be increased to the content of
> the sorting key. Also the result may need to be convert
On Wed, 9 May 2007, John Stanton wrote:
That program does have the capability, but may not be implemented that way on
Windows. Why not make the change yourself?
A.J.Millan wrote:
As a suggestion, and even in the risk to abuse of Mr Hipp's patience. Would
it be possible to include in the comm
That program does have the capability, but may not be implemented that
way on Windows. Why not make the change yourself?
A.J.Millan wrote:
As a suggestion, and even in the risk to abuse of Mr Hipp's patience. Would
it be possible to include in the command-line program (sqlite3.exe) the
ability
Sorry if this isn't the proper channel, but I couldn't figure out where to
submit a patch. See below for a patch to src/func.c that alters LIKE such
that it has a default escape character of '\'. That is, LIKE behaves by
default as if ESCAPE '\' were appended. Both MySQL and PostgreSQL behave
"Jeff Hamilton" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a complex query that I want to run often and store the results
> to a temporary table. I'd like to compile a statement that looks
> something like:
>
> CREATE TEMP TABLE ? AS SELECT * FROM data WHERE value = ?;
>
> so that I can hav
Jeff Hamilton <[EMAIL PROTECTED]> wrote:
I have a complex query that I want to run often and store the results
to a temporary table. I'd like to compile a statement that looks
something like:
CREATE TEMP TABLE ? AS SELECT * FROM data WHERE value = ?;
so that I can have multiple threads accessin
Hi all,
I have a complex query that I want to run often and store the results
to a temporary table. I'd like to compile a statement that looks
something like:
CREATE TEMP TABLE ? AS SELECT * FROM data WHERE value = ?;
so that I can have multiple threads accessing the results of the query
in var
[EMAIL PROTECTED] wrote:
INTERSECT would give you x=5 AND y=7. For x=5 OR y=7 you want UNION.
Oops, yes of course.
I was thinking of the higher level problem with circles where
intersection could be used to find a small subset of the table that
would then be scanned to locate the points
On Wed, 9 May 2007 21:00:46 +0400
Tomash Brechko <[EMAIL PROTECTED]> wrote:
> On Wed, May 09, 2007 at 14:45:33 +, [EMAIL PROTECTED] wrote:
> > You need an R-Tree index to do something like this. The
> > public-domain version of SQLite only supports B-Tree indices.
> > So, no, indices are not
Id like to get your ideas on implementing a stack using sql tables.
table a, contains references to b
table b contains refernce to a
table c contains delete entries for A (but b must also be purged!)
My processing forces me to load all of a,b and c.
There may be cases where table C ind
On Wed, May 09, 2007 at 14:45:33 +, [EMAIL PROTECTED] wrote:
> You need an R-Tree index to do something like this. The
> public-domain version of SQLite only supports B-Tree indices.
> So, no, indices are not going to help you here.
Alternatively to R-tree index, you may simply partition the
Dennis Cote <[EMAIL PROTECTED]> wrote:
> >
> > Why full table scan? :/
> > SQLite can takes set (1) of rowid by ex(x) index for
> > "X=5". Then takes another set (2) of rowid by ex(y) for "Y=7".
> > Then SQLite need only to union this two set (1) and (2).
> > Final SQLite should returns rows where
bash wrote:
Why full table scan? :/
SQLite can takes set (1) of rowid by ex(x) index for
"X=5". Then takes another set (2) of rowid by ex(y) for "Y=7".
Then SQLite need only to union this two set (1) and (2).
Final SQLite should returns rows where rowid in (set1 union set2).
I think you mea
On Wed, 9 May 2007 11:08:26 -0400
"Samuel R. Neff" <[EMAIL PROTECTED]> wrote:
>
> I wonder if it would be beneficial to add an additional where clause which
> can prefilter the data so you only need to perform the full calculation on a
> subset of records.
>
> I haven't done the math, but let'
On Wed, 09 May 2007 14:45:33 +
[EMAIL PROTECTED] wrote:
> bash <[EMAIL PROTECTED]> wrote:
> >
> > Oh... so this is implementation limitation.
> > Im currently thinking about this table:
> >
> > CREATE TABLE map (
> > x int,
> > y int,
> > name char
> > );
> > CREATE INDEX map_x O
[EMAIL PROTECTED] wrote:Note that some client/server database engines (ex:
PostgreSQL
and I think also firebird) will automatically rewrite the
original query into something logically similar to my
second example above. But the query optimizer in SQLite
does not attempt to be quite that clever.
Vitali Lovich wrote:
The solution I came up with is:
SELECT coalesce(
(SELECT field1 FROM tbl1 WHERE key = $key),
(SELECT field1 FROM tbl2 WHERE key = $key),
(SELECT field1 FROM tbl3 WHERE key = $key))
, field2 FROM tbl1 WHERE key = $key;
However, if
coalesce works the way I think it does, then
I wonder if it would be beneficial to add an additional where clause which
can prefilter the data so you only need to perform the full calculation on a
subset of records.
I haven't done the math, but let's supposed that point_x is 10 and that for
any result of your long calculation to be true,
bash <[EMAIL PROTECTED]> wrote:
>
> Oh... so this is implementation limitation.
> Im currently thinking about this table:
>
> CREATE TABLE map (
> x int,
> y int,
> name char
> );
> CREATE INDEX map_x ON map(x);
> CREATE INDEX map_y ON map(y);
>
> And query for it will be somet
On Wed, 9 May 2007 18:13:07 +0400
Tomash Brechko <[EMAIL PROTECTED]> wrote:
> On Wed, May 09, 2007 at 17:45:52 +0400, bash wrote:
> > > One index per table rule. At first glance it seems like SQLite could
> > > use at least one index for "x=5 OR y=7" case too, but there is no
> > > point in that,
On Wed, May 09, 2007 at 17:45:52 +0400, bash wrote:
> > One index per table rule. At first glance it seems like SQLite could
> > use at least one index for "x=5 OR y=7" case too, but there is no
> > point in that, as the other part of the OR would require full table
> > scan anyway.
>
> Why full
Tomash Brechko <[EMAIL PROTECTED]> wrote:
>
> sqlite> explain query plan
> ...> SELECT id, n1, n2
> ...> FROM tbl
> ...> WHERE n1 = $I
> ...> UNION
> ...> SELECT id, n1, n2
> ...> FROM tbl
> ...> WHERE n2 = $I
> ...> ORDER BY id DESC;
> 0|0
On Wed, 9 May 2007 17:29:29 +0400
Tomash Brechko <[EMAIL PROTECTED]> wrote:
>
> On Wed, May 09, 2007 at 16:32:34 +0400, bash wrote:
> > SELECT * FROM ex1 WHERE x>'abc' AND y>'abc';
> > In this form only one indexes will be used, why not both?
>
> One index per table rule. At first glance it see
On Wed, May 09, 2007 at 16:34:57 +0400, bash wrote:
> On Wed, 9 May 2007 14:24:27 +0400
> Tomash Brechko <[EMAIL PROTECTED]> wrote:
> > From http://www.sqlite.org/optoverview.html section 6.0:
> >
> > Each table in the FROM clause of a query can use at most one index...
> >
> > So the first que
Hi all,
I have a question about an update callback. It's supposed to be called for
every row that's inserted, updated and deleted and it works fine. Now
there's a little thing calles INSERT OR UPDATE (and its friends) which
removes conflicting rows before the INSERT. The thing is, the callback get
On Wed, 9 May 2007 14:24:27 +0400
Tomash Brechko <[EMAIL PROTECTED]> wrote:
> On Wed, May 09, 2007 at 14:03:54 +0400, bash wrote:
> > Im simplify environment:
> >
> > CREATE TABLE tbl(
> > id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
> > n1 int,
> > n2 int
> > );
> > CREATE INDEX id
On Wed, 9 May 2007 12:23:14 +0200
Peter van Dijk <[EMAIL PROTECTED]> wrote:
>
> On 9-mei-2007, at 11:28, bash wrote:
>
> > SELECT type, stamp_id, old_player_id, new_player_id
> > FROM town_log
> > WHERE old_player_id = $ID OR new_player_id = $ID
> > ORDER BY stamp_id DESC;
> >
> > This query wor
Sorry!!
Although there are two other boxes around; one with XP and the other with
Vista, for test purposes, actually I still use a third, with my old Windows
98SE and a utility, DOSKEY.COM, who emulates the Linux behavior in the
Windows shell (who natively does not do that), but when I use it wit
In old versions it work... But in new versions (3.* I think) its not
working!
On Wed, 2007-05-09 at 12:11 +0200, Peter van Dijk wrote:
> On 9-mei-2007, at 11:06, A.J.Millan wrote:
>
> > As a suggestion, and even in the risk to abuse of Mr Hipp's
> > patience. Would
> > it be possible to include
On Wed, May 09, 2007 at 14:03:54 +0400, bash wrote:
> Im simplify environment:
>
> CREATE TABLE tbl(
> id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
> n1 int,
> n2 int
> );
> CREATE INDEX idx1 on tbl(n1);
> CREATE INDEX idx2 on tbl(n2);
>
> sqlite> select count(*) from tbl;
> 6
On 9-mei-2007, at 11:28, bash wrote:
SELECT type, stamp_id, old_player_id, new_player_id
FROM town_log
WHERE old_player_id = $ID OR new_player_id = $ID
ORDER BY stamp_id DESC;
This query works really slowly and i don't know why :/
For example, the same result by another QUERY work much faster!
On 9-mei-2007, at 11:06, A.J.Millan wrote:
As a suggestion, and even in the risk to abuse of Mr Hipp's
patience. Would
it be possible to include in the command-line program (sqlite3.exe)
the
ability to edit, an repeat at least the five or six last commands,
as in
Linux?. Is to say with up-
Im simplify environment:
CREATE TABLE tbl(
id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
n1 int,
n2 int
);
CREATE INDEX idx1 on tbl(n1);
CREATE INDEX idx2 on tbl(n2);
sqlite> select count(*) from tbl;
63026
1 query:
SELECT id, n1, n2
FROM tbl
WHERE n1 = $I OR n2 = $I
OR
Hello All,
Im using SQLite-3.3.17.
My table is:
CREATE TABLE town_log (
id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
town_id int,
stamp_id int,
old_player_id int,
new_player_i
As a suggestion, and even in the risk to abuse of Mr Hipp's patience. Would
it be possible to include in the command-line program (sqlite3.exe) the
ability to edit, an repeat at least the five or six last commands, as in
Linux?. Is to say with up-arrow and down-arrow. I believe it would be too
hel
52 matches
Mail list logo