Fixed uninitialized attributes in database class

Some attributes, in particular $_whereTypeList, are unset before they're used to build queries. This triggers plenty of notices.