Jump to content

Archived

This topic is now archived and is closed to further replies.

digitalgod

simple query help [solved]

Recommended Posts

I'm trying to display everything in 1 table that's not in another table.

[code]
<?php
$sql='SELECT * FROM djs WHERE name NOT
?>
[/code]

I need to select all the djs from the djs table that are not in the djsweek table... how can I do that?

Share this post


Link to post
Share on other sites
Would have been a bit more help if you gave us the the columns of both tables. This will get u started.

SELECT *
FROM djs
WHERE NOT EXISTS
(

SELECT *
FROM djsweek
WHERE djsweek.name = djs.name

)

Share this post


Link to post
Share on other sites
I tried that but it gave me an error....

the columns of both tables match but I just need to check the names

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.