www.webdeveloper.com
Results 1 to 4 of 4

Thread: Must be missing something

  1. #1
    Join Date
    Dec 2005
    Location
    Queen Creek, AZ
    Posts
    1,564

    Must be missing something

    Am I asking for something wrong here.....

    Code:
    SELECT advisors.name FROM advisors WHERE advisors.advisor_id = (SELECT available.advisor_id FROM available WHERE available.status = yes))
    what I want to do is display a list of available advisors.

    It should return simply an advisors name.

    Thx, it's late in the day and I'm tired....lol

  2. #2
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    1,138
    try
    Code:
    SELECT DISTINCT advisors.name FROM advisors WHERE advisors.advisor_id IN (SELECT available.advisor_id FROM available WHERE available.status = yes)
    Last edited by chrismartz; 01-10-2006 at 07:50 PM.

  3. #3
    Join Date
    Dec 2005
    Location
    Queen Creek, AZ
    Posts
    1,564
    Thanks Chris, works a treat!

    If toast always lands butter-side down, and cats always land on their feet, what happens if you strap toast on the back of a cat and drop it?
    ...the cats spins around and licks the butter off the toast

  4. #4
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    1,138
    No problem. Just remember that if you have a list of items your selecting from, use IN instead of =.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles