[RESOLVED] Using a Field Multiple Times in One Statement?
I am working on a ticketing system and need to pull the same field from a table twice. In my ticket table there is a field that links to the creator's contact ID as well as the assigned person's contact ID. Basically, both of these link to the ID field in the contact table. Doing this connection is not the problem. I need to pull out <contact table>.name twice, once for each ID (creator, assigned). MySQL is pulling only one of the names, and is simply displaying it twice. A sample of what I have so far is below:
SELECT B.name, B.name AS assignee
FROM ticket A, contacts B
LEFT JOIN B ON A.assigned_id=B.id