Re: [sqlite] database filename

2008-10-18 Thread Mike Johnston
I understand the pragma but was hoping for something like this const char *sqlite3_column_database_name(sqlite3_stmt*,int); but with the sqlite3* and not a statement? Thanks again --- On Sat, 10/18/08, Igor Tandetnik <[EMAIL PROTECTED]> wrote: From: Igor Tandetnik <[EMAIL PROTECTED]> Subject: Re:

Re: [sqlite] database filename

2008-10-18 Thread Igor Tandetnik
"Mike Johnston" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Given a sqlite3 * database handle, is there a way to retrieve the > filename used to open the database? Run this statement on your handle: PRAGMA database_list; Note that there may be more than one file associated with

Re: [sqlite] Multiple Selects

2008-10-18 Thread Igor Tandetnik
"Andrew Gatt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm guessing my SQL is the worst way of doing things so i've been > trying to find a better method. I stumbled across "SELECT name FROM > table WHERE id IN (x,y,z) however this doesn't allow me to specify > the order the ro

[sqlite] database filename

2008-10-18 Thread Mike Johnston
Given a sqlite3 * database handle, is there a way to retrieve the filename used to open the database? TIA __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __

Re: [sqlite] Multiple Selects

2008-10-18 Thread P Kishor
On 10/18/08, Andrew Gatt <[EMAIL PROTECTED]> wrote: > Jonas Sandman wrote: > > Just to point out the obvious, have you tried ORDER BY? > > > > "SELECT name FROM table ORDER BY name;" will return your list in > > alphabetical order. > > > > /Jonas > > > > > > Thanks for the suggestion, but i

Re: [sqlite] Multiple Selects

2008-10-18 Thread Jonas Sandman
If it's completely arbitrary I think you are stuck with using union unless it's an order that you might know beforehand. Then you can add an extra column with the index. /Jonas On Sat, Oct 18, 2008 at 7:05 PM, Andrew Gatt <[EMAIL PROTECTED]> wrote: > Jonas Sandman wrote: >> Just to point out the

Re: [sqlite] Multiple Selects

2008-10-18 Thread Andrew Gatt
Jonas Sandman wrote: > Just to point out the obvious, have you tried ORDER BY? > > "SELECT name FROM table ORDER BY name;" will return your list in > alphabetical order. > > /Jonas > > Thanks for the suggestion, but it needs to be an order i can specify, not just ordered. I.e. i may want row 45

Re: [sqlite] Multiple Selects

2008-10-18 Thread Jonas Sandman
Just to point out the obvious, have you tried ORDER BY? "SELECT name FROM table ORDER BY name;" will return your list in alphabetical order. /Jonas On Sat, Oct 18, 2008 at 6:53 PM, Andrew Gatt <[EMAIL PROTECTED]> wrote: > Andrew Gatt wrote: >> I'm not sure if i'm missing something, but is there

Re: [sqlite] Multiple Selects

2008-10-18 Thread Andrew Gatt
Andrew Gatt wrote: > I'm not sure if i'm missing something, but is there an efficient way of > retrieving multiple rows based on different conditions in order. For > example i have a table with rows of ids, i want to select multiple rows > at a time. At present i am doing a "SELECT name FROM tab

Re: [sqlite] AFTER INSERT vs AFTER UPDATE

2008-10-18 Thread P Kishor
On 10/18/08, Kristofer Hindersson <[EMAIL PROTECTED]> wrote: > > > Hi, > > Thank you for answering my question regarding a trigger for updating my > updated-field. I was just wondering if I should really be using the AFTER > INSERT ON statement instead of AFTER UPDATE ON? Wouldn't the first one on

[sqlite] Multiple Selects

2008-10-18 Thread Andrew Gatt
I'm not sure if i'm missing something, but is there an efficient way of retrieving multiple rows based on different conditions in order. For example i have a table with rows of ids, i want to select multiple rows at a time. At present i am doing a "SELECT name FROM table WHERE id = x" for each

Re: [sqlite] Compiling with mingw32/msys on Windows

2008-10-18 Thread Shane Harrelson
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT is not being passed in make to your object compiles... I'll try to duplicate this here. -Shane On Fri, Oct 17, 2008 at 5:40 PM, John Belli <[EMAIL PROTECTED]> wrote: > OK, I should have all the required utils, and configure apparently > worked properly, but m

Re: [sqlite] Questions about "analyze"

2008-10-18 Thread Clodo
Thanks for feedback. "The right data"::: we don't have any wrong data Imagine to have a table with millions of records, for example records about website, with a field="needtoupdate=false" normally. A background job that mark few records at time by setting "needtoupdate=true". And another ba