G'day Nils

> no offense, but are you actually using the JOIN syntax correctly ?
€€€€
No offence taken - that's why I'm asking the question - I don't know whether
I'm approaching this correctly.  As I said, I'm new to MySQL ...

> Could you post your query please ?
€€€€
OK.

Adtrack -  holds data about an ads status (but NOT page number)
Dummy - holds data about ad position, geometry and page number
Stories - holds data about stories and their page number
Pages -  holds data about pages and their status

I want to be able to display a page and all its associated pieces but
without duplicates. I know a union would display what I want, but I can't
get all the necessary data without doing a join.

The current query is:

SELECT 
dummy.page_number,dummy.ad_num,adtrack.ad_status,stories.story_name,stories.
story_status FROM adtrack,dummy,stories WHERE adtrack.ad_num = dummy.ad_num
AND dummy.page_number = stories.page_number order by dummy.page_number ASC"

> mysql> SELECT * FROM table1 LEFT JOIN table2 ON table1.id=table2.id;
> mysql> SELECT * FROM table1 LEFT JOIN table2 USING (id);
€€€€
I'm not familiar with either 'On' or 'Using' but I will take a look

cheers

kim


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

Reply via email to