in reply to SQLite UPDATE table lock
In my experience, SQLite only likes one active statement or cursor. So, nesting loops that read/write from tables at the same time generally don't work.
In your case, it seems it could be enough to ->finish your $sth before calling update_seasons. Alternatively, you could make your SQL more explicit by fetching the count(*) instead of asking the statement how many rows it would return. Then you would also need to use ->fetchall or selectall_arrayref to fetch all data in one go.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SQLite UPDATE table lock
by packetstormer (Monk) on Jul 23, 2012 at 14:01 UTC | |
by mje (Curate) on Jul 23, 2012 at 16:03 UTC |