Jump to content

Who did change it?


Boxerman

Recommended Posts

Hi chaps,

 

I'm a rock in a hard place, basically i want to pull back a row called realname from bugs_activity but only the name of the person who removed CONV from the table..

 

So, the table layout:

 

Field * Type * bug_id mediumint(9) who mediumint(9) bug_when datetime fieldid mediumint(9) added tinytext removed tinytext

 

What i want to get in the WHO REMOVED the work 'CONV' from the BUG_ID.

 

Below you are about to witness the most messed up SQL coding of your life...

SELECT pr.description, bi.BugID, p.login_name AS loginname, p.realname AS prealname, du.realname, b.short_desc, bi.Last_Mod, baw.realname, babid.bug_id
FROM conversions.Box_Info bi
LEFT JOIN conversions.page_refs pr ON (pr.PGID = bi.boxid) 
LEFT JOIN bugs.profiles p ON (bi.UserID = p.userid)
LEFT JOIN bugs.bugs b ON (b.bug_id = bi.BugID) 
LEFT JOIN bugs.profiles du ON du.userid = b.assigned_to
LEFT JOIN bugs.bugs try ON try.assigned_to = du.realname
LEFT JOIN bugs_activity babid ON babid.bug_id = b.bug_id
LEFT JOIN bugs.profiles baw ON baw.userid = babid.who
WHERE bi.box_use in (0,1)
AND babid.removed = 'CONV'
AND (b.op_sys not like 'CONV' AND b.op_sys not like 'CNVA') 
OR b.bug_status = 'CLOSED'  
OR b.bug_status = 'RESOLVED' 
AND bi.matterid != 90
GROUP BY description

What i have managed to get from that is a random name of someone, but not he actual user who is linked with removing 'CONV' from the bugs database.

 

Can anyone point to where i am going wrong!

 

Again sorry for the mess, i hope i provided enough for you gurus.

 

Thanks,

B-Man

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.