I've got the following query:

SELECT `bugs`.`id`, `bugs`.`assignee`, `users`.`username`, `bugs`.`submitter` FROM `fb_bugs` AS `bugs`, `fb_users` AS `users` WHERE `users`.`id` = `bugs`.`assignee`

My problem is that I also want the `users`.`username` for `bugs`.`submitter`. How can I do that?

Also, anyway to make the entire query better (the above is just the relevant part):

SELECT `bugs`.`id`, `bugs`.`title`, UNIX_TIMESTAMP (`bugs`.`submitted`), `bugs`.`fix`, `bugs`.`assignee`, `users`.`username`, `bugs`.`category`, `category`.`name`, `bugs`.`version`, `version`.`name`, `bugs`.`priority`, `bugs`.`haspatch`FROM `fb_bugs` AS `bugs`, `fb_users` AS `users`, `fb_category` AS `category`, `fb_versions` AS `version` WHERE `users`.`id` = `bugs`.`assignee` AND `category`.`id` = `bugs`.`category` AND `version`.`id` = `bugs`.`version`

Help will very much be appreciated, as SQL like this really isn't what I'm good at :)

- Geoffrey Sneddon




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to