Jump to content


Photo

Problelm Joining 2 "Select Queries"


  • Please log in to reply
1 reply to this topic

#1 madolia

madolia
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 04 September 2006 - 03:11 AM

I've been trying to solve this problem but I can't.

I hv two seperate tables A and B.
TABLE A



IDticketNOProgramIDApproval
141ABC124Approved
241GHJ489Approved


TABLE B



ProgramIDDescriptionOwnerID
ABC124SwimmingN77893987T
GHJ489CyclingN35267141H


I have two select queries which I need to use  cos I have to look up the tables based on the ticketNO and OwnerID.
1) Select * from TABLE A where ticketNO="41" and ProgramID="ABC124";
2) Select * from TABLE B where ProgramID="ABC124" and OwnerID="N77893987T";

I do not know how to combine this query so that I can retrieve the datas using PHP and use it in my program. NOTE : There can be the same ticketNO with different ProgramID.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 04 September 2006 - 03:33 AM

Combine how?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users