Fixed the previous sql update by elgatocoder
Consolidated into one file.

Signed-off-by: SkyFire <admin@projectskyfire.org>