Hi,

Do you mean you have such a structure

Table A
ID_a
ID_b
ID_c
...

Table B
ID_b
Value_b
...

Table C
ID_c
Value_c
...

?

In that case you can 

SELECT Value_b, Value_c
FROM A
LEFT JOIN B on A.ID_b=B.ID_b
LEFT JOIN C on A.ID_c=C.ID_c
WHERE ID_a=xxx


Regards,
Patrick

 

> -----Original Message-----
> From: Gregory Machin [mailto:[EMAIL PROTECTED] 
> Sent: Monday, 16 January 2006 09:14
> To: mysql@lists.mysql.com
> Subject: doing mulitple quires in one go.
> 
> Hi.
> I'm in need of advise . I have a table that in 2 columns 
> holds id values to data in two other tables. At the moment I 
> do three quieries. One to get the primary data then use the 
> to id valuse to quiery the other two table to get the 
> required valuse.. Is there a way I can get mysql to return 
> all the data in one quiery ?
> 
> Many thanks
> 
> --
> Gregory Machin
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> www.linuxpro.co.za
> www.exponent.co.za
> Web Hosting Solutions
> Scalable Linux Solutions
> www.iberry.info (support and admin)
> 
> +27 72 524 8096
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to