Forum Moderators: coopster

Message Too Old, No Replies

tack on a few mysql joins to a select statement

single SQL statement that joins 6 tables

         

dheck

5:21 pm on Jul 17, 2005 (gmt 0)

10+ Year Member



Hi,
Any thoughts on how to add the result of a few (five to be exact) JOIN statements onto a larger generic SELECT statement in MySQL. I've tried UNION between the large SELECT statement and the JOIN select statement but the number of columns must be equal, so that is not what I'm looking for. I'm simply looking to substitute a few columns with there respective data (from anonther table using join) in a larger SELECT statement so that the entire row is available in one variable ie: $result= mysql_query("single SQL statement that joins 6 tables"). Is this possible? Thanks

dreamcatcher

5:33 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World dheck. :)

Have you tried the MySQL Query Browser? That may help you with your queries.

[dev.mysql.com...]

dc

dheck

5:48 pm on Jul 17, 2005 (gmt 0)

10+ Year Member



thanks for the reply,
actually I figured out the problem, I just needed to add some AND's to the WHERE clause to create multiple simultaineous joins. Oops, pretty simple. Anyway, thanks again for the response.