SELECT `mantis_bug_relationship_table` . `id` , `mantis_bug_relationship_table` . `relationship_type` , `mantis_bug_relationship_table` . `source_bug_id` , `mantis_bug_relationship_table` . `destination_bug_id` , `mantis_bug_table` . `project_id` FROM `mantis_bug_relationship_table` INNER JOIN `mantis_bug_table` ON `mantis_bug_relationship_table` . `destination_bug_id` = `mantis_bug_table` . `id` WHERE `source_bug_id` = ? ORDER BY `relationship_type` , `mantis_bug_relationship_table` . `id` 