Re: sqlite bug in Pike 8.1?
larcky <[email protected]> Sun, 11 Mar 2018 10:32:46 -0700 (MST)
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Bill
Sorry here's the example again without those tags:
int main()
{
Sql.Sql conn = Sql.Sql("sqlite://mydb.db");
conn->query("create table t(id int)");
array arr = ({ 14, 3, 7, 9, 100, 20, 5, 12 });
foreach (arr, int x) {
conn->query("insert into t(id) values(%d)", x);
}
return 0;
}
This works on stable 8.0.498 but not on 8.1.12. (I noticed when I ran some
sqlite project on 8.1 instead of stable by mistake).
On 8.1 only the other format seems to work:
conn->query("insert into t(id) values(:var)", ([":var":x]));
Regards, larcky
--
Sent from: http://pike.1058338.n5.nabble.com/Pike-User-f4601254.html