On 7 Jun 2006, at 18:56, Peter Brawley wrote:
> Join users a second time for bugs.submitter, eg ...
>
> SELECT
> bugs.id, bugs.title, UNIX_TIMESTAMP(bugs.submitted), bugs.fix,
> bugs.assignee,
> users.username,
> users2.username AS Submitter,
> bugs.category,
> category.name,
> bugs.version,
> version.name,
> bugs.priority, bugs.haspatch
> FROM fb_bugs AS bugs
> INNER JOIN fb_users AS users ON bugs.assignee = users.id
> INNER JOIN fb_users AS users2 ON bugs.submitter = users2.id
> INNER JOIN fb_category AS category ON bugs.category = category.id
> INNER JOIN fb_versions AS version ON bugs.version = version.id
>
> PB
Much thanks, that's saved me… this time. :)
All the best,
Geoffrey Sneddon.