removed elgg_get_database() since the db object is not public yet