SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Zealot erikwebb's Avatar
    Join Date
    Dec 2003
    Atlanta, GA
    0 Post(s)
    0 Thread(s)

    [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, AS assignee 
       FROM ticket A, contacts B 
       LEFT JOIN B ON 
    Last edited by erikwebb; Feb 3, 2006 at 14:32.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts