Adding sql handling for site