Moar SQL updates

working on Check In and Check out Logic. srs problems ensue. look at
comments for more info.