Commits

Luke Plant committed e60fcb6

Made use of SQLite last_insert_rowid()

Comments (0)

Files changed (1)

                      toSql $ P.format_id p,
                      toSql $ P.timestamp p,
                      toSql $ P.comments_open p];
-                    [[newid]] <- quickQuery cn "SELECT max(id) FROM posts;" [];
+                    [[newid]] <- quickQuery cn "SELECT last_insert_rowid();" [];
                     return p { P.id = fromSql $ newid } ; }
 
 main = handleSqlError $ do