Forums

This topic is locked

INNER JOIN SQL STATEMENT...

Posted 17 Dec 2003 14:51:02
1
has voted
17 Dec 2003 14:51:02 Matt Jukes posted:
Hello, hope someone out there can help<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I have a db that has one table that holds the body of information needed for the site.

I then have two further tables that hold one piece of information that is used by the main table, eg ( area & country ).

At the moment the main table has no information in it except for the first column,( Holiday Resort Names ) the other fields hold the other information for each resort.

I have INNER JOINED the three tables for the SQL query and update/edit pages in my admin section, However when i open the overview page to view all entries in the main table only the results that have both area and country entered appear. I have set all the entries under those two catergories to 0, But I cannot get the db or query to return all the entries so i can update and insert the information needed for the other fields.

My SQL is as follows

SELECT *
FROM tbltcsresort INNER JOIN tbltcsarea INNER JOIN tbltcscountry ON tbltcsresort.areaID = tbltcsarea.areaID AND tbltcsresort.countryID = tbltcscountry.countryID
WHERE tbltcsresort.countryID &lt;&gt; -1 AND tbltcsresort.areaID &lt;&gt; -1

This seems to be fine and gives no errors but won't give the info I want.

Has anyone got any ideas on this, I will keep looking through the site but I haven't been able to find anything on this as yet.

Thanks in regards.
Matt

Reply to this topic