|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Empty Table Ruins Query
My goal is to create a query that selects authors that are NOT associated with a certain article. This would include authors that are not associated with any articles.
Here are my tables: AUTHOR id first mid last ARTICLE id title body ART_AUTH (link table) artid authid Here is my query thus far: SELECT author.id, author.first, author.mid, author.last, FROM author, art_auth WHERE author.id<>art_auth.authid OR (author.id=ar t_auth.authid AND art_auth.artid<>$artid) It works GREAT until the link table is empty. Then it returns 0 rows. In that case, I would like it to just return all the authors in the authors table. Have any sugestions??? |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Empty Table Ruins Query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|