On Wed, Sep 14, 2011 at 04:28:55PM -0700, Jim Michaels scratched on the wall: > with an existing record, and a fieldname that is in a column that > has a UNIQUE INDEX, if I do sqlite_exec("UPDATE database SET > fieldname="&sqlite_escape("get calculator batteries")&" WHERE > fieldname=sqlite_escape("get hp50g calc cells")&";" > this code actually deletes the record. it should not. I don't ever > remember seeing this happen in any database like pgsql or mysql. I > can test again to see for sure. > > > the test code can be seen at > http://www.autoitscript.com/trac/autoit/ticket/2012
Are you sure it is gone? I'm not familiar with this API, but you appear to be finalizing the query BEFORE you extract rows from it. In the native API, that's not valid, making the code report no rows, when it is really trying to report an API error. Depending on how this API maps to the native API, the issue may be the SELECT, not the UPDATE. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users