On 26/01/2009 12:17 PM, Rickard Westerlund wrote:
> On Sun, Jan 25, 2009 at 12:12 AM, John Machin <sjmac...@lexicon.net> wrote:
>> So SELECT has the same problem as UPDATE. That would suggest to me that
>> the next step would be to try the following:
>>
>> (1) SELECT *, (CASE .....END) FROM tags WHERE lft BETWEEN ? AND ?
>> (2) SELECT * FROM tags WHERE lft BETWEEN ? AND ?
>>
>> and if (2) still finds no rows, we must be at the stage of asking you to
>> show the whole of the minimal C program that demonstrates the problem.
> At first I had the "*," part removed and forgot to mention that in my
> haste, as well as testing with it. It apparently made a whole
> difference, the SELECT statements work and give the desired results so
> the previous suggestion was alright.

That is mind-bogglingly confusing. Which previous suggestion? Care to 
itemise what appears to work and what appears not to work?

> 
> In any case, I prepared an isolated test case which can be gotten from
> the link below. It contains source for the program as well as a
> prepared database that is supposed to be updated by the call made from
> the test program.
> http://www.acc.umu.se/~onionkgt/tagdb_test.zip

Could apparent lack of activity be due to the fact that "ret" is used 
but not initialised in the following function?

tagdb* tagdb_open (const char* path)
{
        int ret;
        tagdb* db;

        if (sqlite3_open(path, &db) != SQLITE_OK)
                return NULL;
        if (ret != SQLITE_OK && ret != SQLITE_ERROR) {
                tagdb_close(db);
                return NULL;
        }

        return db;
}

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to