Re: [sqlite] Newbie what does & do.

2009-03-27 Thread Jay A. Kreibich
On Fri, Mar 27, 2009 at 05:37:49PM +, Dermot scratched on the wall: > The statement is: > > SELECT COUNT(*) FROM products WHERE productid=808800033 AND > (allowcountry2 & 0x0001) > SELECT COUNT(*) FROM products WHERE productid=808800033 AND > (allowcountry1 & 0x8000)

[sqlite] ANN - DBD::SQLite version

2009-03-27 Thread Darren Duncan
All, I am pleased to announce that DBD::SQLite (Self Contained SQLite RDBMS in a DBI Driver) version 1.19_01 has been released on CPAN. http://search.cpan.org/~adamk/DBD-SQLite-1.19_01/ This is the first CPAN release of DBD::SQLite since version 1.14 about 18 months ago. This is the

Re: [sqlite] Newbie what does & do.

2009-03-27 Thread John Machin
On 28/03/2009 4:37 AM, Dermot wrote: > Hi, > > I just bough my "Introduction to SQL 4th edition" as per a list > member's advice. > > Before I had a chance to take it home and start going through it I > came across an SQL statement that I could use some help understanding. > > The statement is:

Re: [sqlite] sequential row numbers from query

2009-03-27 Thread Robert Citek
That would work. In fact, my current solution, which actually pipes to perl, works pretty well. It's just that I have to then import the data back into the database. So, I'd prefer to do the process entirely in SQL. I was thinking maybe a view, but that didn't work. Apparently, there is no

Re: [sqlite] sequential row numbers from query

2009-03-27 Thread Kees Nuyt
On Fri, 27 Mar 2009 16:37:37 -0400, Thomas Briggs wrote: > > Holy cow that feels inefficient. Yes, it certainly is. > It's a bit clunky, but why not insert into a temporary table, >ordered as desired, and then use the rowid from the temp table? Yes, or solve it in the host

[sqlite] Out of memory error on query returning no records

2009-03-27 Thread Radcon Entec
I found the table that I wasn't closing properly, which was locking up my database.  Thanks again, Dr. Hipp, for pointing me in the right direction. But I just stumbled on another problem.  It shouldn't show up in production, but it wouldn't be good to ignore it, either.  The table I'm

[sqlite] Newbie what does & do.

2009-03-27 Thread Dermot
Hi, I just bough my "Introduction to SQL 4th edition" as per a list member's advice. Before I had a chance to take it home and start going through it I came across an SQL statement that I could use some help understanding. The statement is: SELECT COUNT(*) FROM products WHERE

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Simon Davies : > 2009/3/27 Francois Botha : >> >> Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email, >> because it contains line breaks and I don't want the formatting to change >> during email

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Francois Botha : > (my apologies if this is a duplicate) > > >> Attachments don't make it through the mailing list, >> > > Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email, > because it contains line breaks and I don't want the

Re: [sqlite] Help with SQL and index (or schema?)

2009-03-27 Thread Kees Nuyt
On Fri, 27 Mar 2009 18:08:13 +0100, Kees Nuyt wrote: > PRIMARY KEY (filepathid,filename,istarget) Oops, make that PRIMARY KEY (pathid,filename,istarget) -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list

Re: [sqlite] Help with SQL and index (or schema?)

2009-03-27 Thread Kees Nuyt
On Fri, 27 Mar 2009 15:53:18 +0100, Jonas Sandman wrote: >Hello, > >I have a database with about 137000 * 2 rows with four columns; >fileid, filename, filepath and istarget. >It's used to determine if two scanned directories are equal so I run a >simply query to get the

[sqlite] SQLite Readonly

2009-03-27 Thread lucky1234
I have created SQLite database using Firefox. I added tables and data also. But when I again open it, it is giving me, Exception Name: NS_ERROR_FILE_READ_ONLY Exception Message: Component returned failure code: 0x80520013 (NS_ERROR_FILE_READ_ONLY) [mozIStorageStatement.execute] Initially it was

Re: [sqlite] Allowing external writes while a database is open

2009-03-27 Thread D. Richard Hipp
On Mar 27, 2009, at 11:10 AM, Radcon Entec wrote: > Hello! > > We are using SQLite to collect process data so that it can be > displayed on a graph. While a user is looking at the graph, the > database is locked and no new data can be added to the table. If a > user opens a graph and

[sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
(my apologies if this is a duplicate) > Attachments don't make it through the mailing list, > Uhm, sorry. I'm new here. I don't want to paste the SQL script in an email, because it contains line breaks and I don't want the formatting to change during email transport. Try

[sqlite] Allowing external writes while a database is open

2009-03-27 Thread Radcon Entec
Hello! We are using SQLite to collect process data so that it can be displayed on a graph.  While a user is looking at the graph, the database is locked and no new data can be added to the table.  If a user opens a graph and walks away for two hours, the database containing data for that graph

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Francois Botha : > > The example you used, works 100% for me.  I attach a sql script for which I > experience the problem. > Attachments don't make it through the mailing list, Rgds, Simon ___ sqlite-users mailing

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
> > > See if you get same problem using data above. > If not, then your data is relevant to the issue. > If yes, then your sqlite is not the same as mine. > > Rgds, > Simon The example you used, works 100% for me. I attach a sql script for which I experience the problem. Extract it and do:

[sqlite] Select table name and count(*) on same command

2009-03-27 Thread MaxMax14
Hello, Sincères salutations MaxMax14 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [C] API: INSERT OR REPLACE

2009-03-27 Thread Igor Tandetnik
""Severin Müller"" wrote in message news:20090327084050.24...@gmx.net > I wam writing a program where i need some data. > > I try to dynamically create a database for this. All my data are > stored in a struct, resp. several structs. What I need now, is to > know, whether

Re: [sqlite] [C] API: INSERT OR REPLACE

2009-03-27 Thread mrobi002
Hi Severin, I found very useful the actual code samples at this location: http://www.apress.com/book/downloadfile/2847 The samples for C are under the subdirectory CAPI, there is no subdirectory called C Also you will find additional information at http://www.sqlite.org/c_interface.html

[sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
Hi, I noticed that there is unnecessary line breaks in the .dump output, specifically \n characters, (not full \r\n 's). To illustrate this Put this in a loop (say about a 100) times: sqlite3.exe MyDB.s3db .dump > MyDB.sql del MyDB.s3db sqlite3.exe -init MyDB.sql MyDB.s3db .quit With each

Re: [sqlite] Sqlite versus mySQL in PHP

2009-03-27 Thread Radu Lodina
One (and first) shoot: - try to use : BEGIN TRANSACTION COMMIT TRANSACTION - Original Message - From: "Anton Rifco" To: Sent: Friday, March 27, 2009 11:28 AM Subject: [sqlite] Sqlite versus mySQL in PHP > Hi guys, > > I would

Re: [sqlite] Sqlite versus mySQL in PHP

2009-03-27 Thread Martin Engelschalk
Hi, wrap your inserts in a transaction. Place $q = sqlite_query("begin"); before your loop, and $q = sqlite_query("commit"); after your loop of inserts. Martin Anton Rifco wrote: > Hi guys, > > I would like to ask a question about sqlite in php. I don't know if I am > sending this message to

[sqlite] Sqlite versus mySQL in PHP

2009-03-27 Thread Anton Rifco
Hi guys, I would like to ask a question about sqlite in php. I don't know if I am sending this message to the right place, but I don't know where else to ask. Lately, I read in http://www.sqlite.org/speed.html, that sqlite is a bit faster than mysql and postgreSQL. But, when I perform a little

[sqlite] [C] API: INSERT OR REPLACE

2009-03-27 Thread Severin Müller
Hello I wam writing a program where i need some data. I try to dynamically create a database for this. All my data are stored in a struct, resp. several structs. What I need now, is to know, whether it's possible to check every row I'm submitting for existance, like: row1: data1 data2 data3