Re: [sqlite] "-journal" file?

2009-04-02 Thread Eric Minbiole
> Whenever my phBB3 install is failing on the PPC Mac Mini, it appears > that SQLite is producing an empty database file (size 0) plus a file > with the same name plus "-journal" appended. What kind of error is > this? Does this mean SQLite somehow crashed out while attempting to > write

[sqlite] "-journal" file?

2009-04-02 Thread Zobeid Zuma
Whenever my phBB3 install is failing on the PPC Mac Mini, it appears that SQLite is producing an empty database file (size 0) plus a file with the same name plus "-journal" appended. What kind of error is this? Does this mean SQLite somehow crashed out while attempting to write to the

[sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread centipede moto
> >#include > >#include > >#include > >#include > >#include > > > >int main() > >{ > >// create the database > >sqlite3 *db; > >int rc; > > > >rc = sqlite3_open("cmx.db", ); > >} > > This code will not create a database file, because there is > no schema to store. > You have

Re: [sqlite] SQLite on Mac OS X with PowerPC?

2009-04-02 Thread P Kishor
On Thu, Apr 2, 2009 at 2:04 PM, Zobeid Zuma wrote: > I recently tried installing phpBB3 with SQLite on two Macs -- one > Intel-based and the other PPC. > > The Intel Mac worked perfectly, but the PPC machine keeps stalling > out.  It's turned into quite a puzzle for me.  So. .

[sqlite] SQLite on Mac OS X with PowerPC?

2009-04-02 Thread Zobeid Zuma
I recently tried installing phpBB3 with SQLite on two Macs -- one Intel-based and the other PPC. The Intel Mac worked perfectly, but the PPC machine keeps stalling out. It's turned into quite a puzzle for me. So. . .I recalled that SQLite is only available as a binary for Intel-based

Re: [sqlite] install sqlite bin on linux fedora 10?

2009-04-02 Thread P Kishor
On Thu, Apr 2, 2009 at 1:47 PM, Antonio Pedro Dinis wrote: > install sqlite bin on linux fedora 10? > > i downloaded the sqlite3-3.6.12.bin , and i dont know how to install it on > linux and start working with sqllite with php > > any ideas Google? > > thanks > >

Re: [sqlite] question about indexing

2009-04-02 Thread Igor Tandetnik
baxy77bax wrote: > i need some help to see if i understood the point about indexing. > > if i have 2 tables. each table has 2 columns. and now i want to join > those tables through one column in each table: > > example > T1 > C1 C2 >> > +--+ > | > T2 | > C1 C2 > > let say

Re: [sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread Kees Nuyt
On Thu, 2 Apr 2009 00:20:15 -0700, centipede moto wrote: >g++ -Wall cmxmc.cpp -lsqlite3 -o cmxmc I won't comment on your compile / link problems, I'm not familiar with Ubuntu and g++. I hope you read the documentation and FAQ on the SQLite site. >Here is my app code: >

[sqlite] question about indexing

2009-04-02 Thread baxy77bax
hi, i need some help to see if i understood the point about indexing. if i have 2 tables. each table has 2 columns. and now i want to join those tables through one column in each table: example T1 C1 C2 | +--+ | T2 | C1 C2 let say the columns in question are C1(t1) and C2(t2)

Re: [sqlite] select the first 2 rows

2009-04-02 Thread Shane Harrelson
Remember, the order of rows returned from a SELECT, even one with a LIMIT clause, is undefined, so the "first 2 rows" may not be consistently the same. If you are dependent upon the rows being returned in a particular order (say by "rowid"), you should include an ORDER BY clause on your SELECT

Re: [sqlite] Simple example for dummy user writing C code

2009-04-02 Thread My Name
On Thu, Apr 2, 2009 at 3:54 PM, Rich Rattanni wrote: > Igor, be careful your not solving someone's homework > Not homework but real work :-) ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] General SQL question...

2009-04-02 Thread John Elrick
Igor Tandetnik wrote: > John Elrick wrote: > >> The following two queries appear to be functionally equivalent...that >> is to say the results they produce are identical. Is there any >> intrinsic advantage to one over the other? If so, what is that >> advantage? >>

Re: [sqlite] Improving query performance

2009-04-02 Thread John Elrick
D. Richard Hipp wrote: > On Apr 1, 2009, at 2:00 PM, John Elrick wrote: > >> explain query plan >> select DISTINCT RESPONSES.RESPONSE_OID >> from DATA_ELEMENTS, RESPONSES, SEQUENCE_ELEMENTS >> where >> SEQUENCE_ELEMENTS.SEQUENCE_ELEMENT_NAME = :sequence_element_name and >>

Re: [sqlite] Simple example for dummy user writing C code

2009-04-02 Thread Rich Rattanni
Oops, hit send to soon. Your second question has been discussed in the thread "IP from number with SQL" started on Sun, Mar 15, 2009 at 4:10 PM. Of course with the knowledge that IPv6 is just IPv4 with more bits thrown at it, you can tweak the discussion to suit your needs. On Thu, Apr 2, 2009

Re: [sqlite] Simple example for dummy user writing C code

2009-04-02 Thread Rich Rattanni
Igor, be careful your not solving someone's homework On Thu, Apr 2, 2009 at 7:39 AM, Igor Tandetnik wrote: > "My Name" > wrote in message > news:ee8102080904012149h3b8d64d9u8b972b1e6fbbf...@mail.gmail.com >> I'm having hard time to store and

Re: [sqlite] Converting BLOB Data type to String

2009-04-02 Thread Igor Tandetnik
"SATISH" wrote in message news:49d4a5bc.0c636e0a.6f6d.4...@mx.google.com > I tried what u suggested me,I got a compiler error cannot convert > const void * to void* . Make it const void* data = sqlite3_column_blob(my_stmt, col_no); int size = sqlite3_column_bytes(my_stmt,

Re: [sqlite] Converting BLOB Data type to String

2009-04-02 Thread SATISH
Hello Igor, I tried what u suggested me,I got a compiler error cannot convert const void * to void* . I am storing string as blob because I want hide my data from others I am writing an application which works on portable apps in my apps I am using sqlite if any one opens the database

Re: [sqlite] dates

2009-04-02 Thread garry
Quoting ga...@schoolteachers.co.uk: > I am trying to get date testing and manipulation to work. Should this work: > > select julianday('now') - julianday(startmonday) from wb > > startmonday is a text field that contains 2009-03-30. > > Also the following returns 'none' > > select

Re: [sqlite] Simple example for dummy user writing C code

2009-04-02 Thread Igor Tandetnik
"My Name" wrote in message news:ee8102080904012149h3b8d64d9u8b972b1e6fbbf...@mail.gmail.com > I'm having hard time to store and retrieve data with SQLite. Let's > assume I have this structure in my C code to hold my data > > struct foo { > long a; > float b; > char

Re: [sqlite] Converting BLOB Data type to String

2009-04-02 Thread Igor Tandetnik
"SATISH" wrote in message news:49d4529b.034c6e0a.2f1d.0...@mx.google.com >I have written a string into database by converting into "BLOB > Data Type".writing into database is Ok I got a problem when reading > from the database to read a blob from the database I am

[sqlite] dates

2009-04-02 Thread garry
I am trying to get date testing and manipulation to work. Should this work: select julianday('now') - julianday(startmonday) from wb startmonday is a text field that contains 2009-03-30. Also the following returns 'none' select julianday(startmonday) from wb Any help would be much

Re: [sqlite] Converting BLOB Data type to String

2009-04-02 Thread SATISH
Hello Buddies, I have inserted into database using the sqlite api function "int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));".Here before binding I have converted the const void * to CString. I am trying to retrieve the data using the sqlite api function

Re: [sqlite] Converting BLOB Data type to String

2009-04-02 Thread Jens Miltner
Am 02.04.2009 um 07:45 schrieb SATISH: > Hello Buddies, > >I have written a string into database by converting into > "BLOB Data > Type".writing into database is Ok I got a problem when reading from > the > database to read a blob from the database I am using the function > "const

Re: [sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread Mihai Limbasan
Have you also installed the corresponding development package? Don't know its name, but typically if you install a package named abcdefgh, its devel package is named abcdefgh-devel. On 04/02/2009 10:20 AM, centipede moto wrote: > I keep getting: > > undefined reference to `sqlite3_open' > >

[sqlite] Library Linking Issues on Ubuntu

2009-04-02 Thread centipede moto
I keep getting: undefined reference to `sqlite3_open' Errors. I have seen forum posts etc on this but none of the suggestions are helping. I've tried including the sqlite3.c file in my compile but I get tons of errors and it won't build. I've tried adding -lsqlite3 to my compile code, then I

[sqlite] sqlite FS question

2009-04-02 Thread Sender 23
i like sqlite so far. my data is utf8 and has all the nightmarish junk chars in it, (quotes,!,line_feeds, CR so on.), currently i use mysql and i load data from a file I painstakingly prepare using: load data local infile '/tmp/p.data' into table tableone fields terminated by "^^^--&&&" LINES