correct some mistakes (cut/paste it's baaad), adding prototypes and sqlite_get_* functions