sql method for CCGuestbook