Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread J. King
On Fri, 11 Sep 2009 18:11:42 -0400, Fred Williams wrote: > Thanks for the "awakening." Now where did I leave that, "Learn PHP In > Twenty Minutes" book? I may be biased when it comes to PHP, but I find its SQLite interface perfectly acceptable. Anyway, you'll

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread RB Smissaert
In my particular case it is simple and I have solved the problem by adding a function via the VB wrapper. RBS -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Darren Duncan Sent: 11 September 2009 22:52 To: General Discussion

Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Fred Williams
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of Darren Duncan Sent: Friday, September 11, 2009 3:49 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] MySQL makes me wish for SQLite Fred Williams wrote: >

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread Igor Tandetnik
Darren Duncan wrote: > RB Smissaert wrote: >> Does SQLite have a string function that produces the first position >> of a string within another string? >> For example select Instr('abcd', 'c') would produce 3 >> Looked in the documentation and the forum, but couldn't see

Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Fred Williams
Hummm... Perhaps I should do a little more homework. I'm looking at a packaged "Shopping Cart" and wishing I could boot out the MySQL. Next release is promising broader database support. BUT, it has been getting ready for Beta "real soon" for about nine months now. Besides, I just got back

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread Darren Duncan
RB Smissaert wrote: > Does SQLite have a string function that produces the first position of a > string within another string? > For example select Instr('abcd', 'c') would produce 3 > Looked in the documentation and the forum, but couldn't see it. This also isn't a simple problem since the

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread RB Smissaert
OK, thanks, saves me looking further. I can add this function via the VB wrapper (Olaf Schmidt's dhRichClient3), but thought it might be faster if there was a pure SQLite implementation. RBS -Original Message- From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread Igor Tandetnik
RB Smissaert wrote: > Does SQLite have a string function that produces the first position > of a string within another string? > For example select Instr('abcd', 'c') would produce 3 Unfortunately, no. Of course, SQLite does provide a way for you to add your own

Re: [sqlite] Does SQLite have an Instr function?

2009-09-11 Thread Simon Slavin
On 11 Sep 2009, at 10:30pm, RB Smissaert wrote: > Does SQLite have a string function that produces the first position > of a > string within another string? > For example select Instr('abcd', 'c') would produce 3 > Looked in the documentation and the forum, but couldn't see it.

[sqlite] Does SQLite have an Instr function?

2009-09-11 Thread RB Smissaert
Does SQLite have a string function that produces the first position of a string within another string? For example select Instr('abcd', 'c') would produce 3 Looked in the documentation and the forum, but couldn't see it. RBS ___ sqlite-users mailing

Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Jay A. Kreibich
On Fri, Sep 11, 2009 at 03:24:09PM -0500, Fred Williams scratched on the wall: > Please, is someone working on a good straight forward .PHP SQLite > interface? I might even pay for it! *Confused* SQLite is built-in to the standard PHP5 distribution. http://php.net/sqlite Is the

Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Fred Williams
Not sure yet. It would need to implemented on the host machine I think. I'm super timeframe compressed right now. In the future I hope to have some "research" time available. I have found a rather simple .PHP SQLite "object" and hope to look a little closer at it when I get that 25 hour day

Re: [sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Hoover, Jeffrey
I saw something about an ODBC module for SQLite. Could you workaround the PHP-SQLite issues via ODBC? -Jeff -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Fred Williams Sent: Friday, September 11, 2009 4:24 PM To: General

[sqlite] MySQL makes me wish for SQLite

2009-09-11 Thread Fred Williams
Just began coming back to speed on MySQL after many years. (Thanks to SQLite) Boy does it SUCK! I've already eaten up the better part of 150MB of disk space, run installation repair once, (of many?) and still trying to find the "admin" logon and password. Damn! It has been too long! Please,

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Simon Slavin
On 11 Sep 2009, at 6:56pm, Dan Kennedy wrote: > On Sep 12, 2009, at 12:01 AM, Simon Slavin wrote: > >> May I ask what happens if SQLITE_MAX_TRIGGER_DEPTH is reached ? Is >> an >> error generated ? Is a transaction marked as failed, etc. ? > > The statement execution fails with SQLITE_ERROR.

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
This is happening when you open an empty file, correct? Is the function sqlite3PagerPagecount() in file pager.c setting it's output parameter to zero as we would expect? i.e. at the end of sqlite3PagerPagecount(): if( pnPage ){ *pnPage = nPage; } is nPage ever non-zero while running

Re: [sqlite] is there a way to enter ascii hex string as a text without binding ?

2009-09-11 Thread yogibabu
Igor Tandetnik wrote: > In any case, what's wrong with parameter binding? Why do you insist on > not using it? > I want to make my code as small as possible. I was wondering if there is a hex() function why shouldn't be dehex() ... -- View this message in context:

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Dan Kennedy
On Sep 12, 2009, at 12:01 AM, Simon Slavin wrote: > > On 11 Sep 2009, at 5:45pm, D. Richard Hipp wrote: > >> The second major enhancement is that SQLite now support recursive >> triggers. The older non-recursive behavior of triggers is still the >> default behavior. Recursive triggers are

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Jay A. Kreibich
On Fri, Sep 11, 2009 at 12:45:44PM -0400, D.Richard Hipp scratched on the wall: > The second major enhancement is that SQLite now support recursive > triggers. I assume this provides a significantly better support for foreign key constraints through the genfkey command. Has anyone had

Re: [sqlite] SQLite version 3.6.18

2009-09-11 Thread Simon Slavin
On 11 Sep 2009, at 5:45pm, D. Richard Hipp wrote: > The second major enhancement is that SQLite now support recursive > triggers. The older non-recursive behavior of triggers is still the > default behavior. Recursive triggers are activated using the > recursive_triggers pragma. In addition to

[sqlite] SQLite version 3.6.18

2009-09-11 Thread D . Richard Hipp
SQLite version 3.6.18 is now available for download from the SQLite website. http://www.sqlite.org/ The SQLite source code is tracked and managed using the Fossil distributed configuration management system. See http://www.fossil-scm.org/ for further information on Fossil. SQLite was

Re: [sqlite] composite PK Constraint: effects on query performance?

2009-09-11 Thread Igor Tandetnik
Tim Romano wrote: > Does SQLite 3.1.x tacitly create an index to implement composite PK > constraints, and is that index used, when possible, to enhance the > performance of joins and order by clauses? Yes and yes. Igor Tandetnik ___ sqlite-users

[sqlite] composite PK Constraint: effects on query performance?

2009-09-11 Thread Tim Romano
Does SQLite 3.1.x tacitly create an index to implement composite PK constraints, and is that index used, when possible, to enhance the performance of joins and order by clauses? Thanks ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread rishabh
ohh i copied the database to the sqlite terminal and did a select on the shell mode, and it did not give anything implying that nothing got inserted. will try the %s thing. thanks. Igor Tandetnik wrote: > > rishabh wrote: >> i put a cout on the insert query string generated by mprintf. >> it

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread Igor Tandetnik
rishabh wrote: > i put a cout on the insert query string generated by mprintf. > it was actually putting the table name within quotes itself, so > putting the extra quotes was not required. %Q surrounds the name with the wrong type of quotes. %Q uses single quotes (as in 't-t'), as required in

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread rishabh
ya, just checked that by printing the string created by mprintf. thanks Igor Tandetnik wrote: > > rishabh wrote: >> i have a stream of data coming in with constant table names and data. >> one of the table names contains a '-' (minus sign). it gives error >> while creating the table. >> >> SQL

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread Igor Tandetnik
rishabh wrote: > i have a stream of data coming in with constant table names and data. > one of the table names contains a '-' (minus sign). it gives error > while creating the table. > > SQL error: near "-": syntax error > something like Create table "t-t" ( a ); works but Create table t-t ( > a

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread rishabh
hey, thanks, i put a cout on the insert query string generated by mprintf. it was actually putting the table name within quotes itself, so putting the extra quotes was not required. now the insert command is not giving any error, but the values did not actually get inserted :( Dan Kennedy-4

Re: [sqlite] SQL error: near "-": syntax error

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 4:32 PM, rishabh wrote: > > i have a stream of data coming in with constant table names and data. > one of the table names contains a '-' (minus sign). it gives error > while > creating the table. > > SQL error: near "-": syntax error > something like Create table "t-t" ( a

[sqlite] SQL error: near "-": syntax error

2009-09-11 Thread rishabh
i have a stream of data coming in with constant table names and data. one of the table names contains a '-' (minus sign). it gives error while creating the table. SQL error: near "-": syntax error something like Create table "t-t" ( a ); works but Create table t-t ( a ); gives the above error.

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread gprand
Hi Richard, sqlite3Corrupt does trigger. Callstack dump: #0 decodeFlags(pPage=0xa026a4cc, flagByte=0) (SQLite\btree.c:1325) #1 A000C1F8 btreeInitPage(pPage=0xa026a4cc) (SQLite\btree.c:1360) #2 A000CB88 getAndInitPage(pBt=0xa025bc28, pgno=1, ppPage=0xa0269f14)

Re: [sqlite] looking for a solution of Object/Relation Mapping with sqlite

2009-09-11 Thread Wenbo Zhao
Thanks for your reply. I'm not asking the question for some detail problems.I just want some people who have experience in this field can give me some ideas. 2009/9/11 Jim Showalter > How complicated are your objects and queries? I've worked with > Hibernate (a lot,

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
On Sep 11, 2009, at 1:58 PM, gprand wrote: > > Hi Richard, > > First, thanks for replying to my problem. > > Definitely answer to your assumptions ist no. I can see the correct > sql > statement into the debugger, nothing is malformed. Checking > sizeof(char) > delivers 1. Processing the