SELECT `tt` . `term_id` , `tt` . `term_taxonomy_id` FROM `wp3_terms` AS `t` INNER JOIN `wp3_term_taxonomy` AS `tt` ON `tt` . `term_id` = `t` . `term_id` WHERE `t` . `name` = ? AND `tt` . `parent` = ? AND `tt` . `taxonomy` = ? ORDER BY `t` . `term_id` ASC LIMIT ? 