SELECT `tr` . `term_taxonomy_id` FROM `wp3_term_relationships` AS `tr` INNER JOIN `wp3_term_taxonomy` AS `tt` ON `tr` . `term_taxonomy_id` = `tt` . `term_taxonomy_id` WHERE `tr` . `object_id` IN (?) AND `tt` . `taxonomy` IN (?) ORDER BY `tr` . `term_taxonomy_id` ASC 