Update wpdb calls