Fixed appointment panel bugs.  Updated db queries.

-Fixed problems with the cancellation and scheduling of appointments.
-Fixed queries in dbQuery for cancelling/scheduling appts.