You want to use the "LEFT JOIN" syntax. A general outline would be:
SELECT [your fields]
FROM accounts LEFT JOIN addresses ON addresses.ID = accounts.ID
WHERE ...
ORDER ...
LIMIT ...
This would select all addresses.ID's, including those where accounts.ID is
NULL.
-Kevin
--On Tuesday, April 03
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote:
> As you can see, the main data is in 'accounts', the 'addresses.ID' is
UNIQUE
> and corresponds to 'accounts.ID'. The fact is that not every account has
an
> address registered with it.
> FROM
> accounts,
> addresses
You're doing a straight join. You
Hello Guys,
I have a (very simple?) SQL question. I'm more then sure the answer to it is
whether "just do this..." or "It's impossible man, how could you even get
that into your mind..."
I have this database design: (it's more complex of course, but you get an
idea)
Table 'account