SQL Fixes

and require once

Signed-off-by: Scott Gordon <me@scottyg.net>