tommeekers
Programmer
I have 2 tables with client data, and 1 table with all the data about the orders these clients make. Now I'm trying to make a query which will show me all orders (ID and status) and the client name (which can be from any one of those 2 tables).
Here is what the database kinda looks like, but when I make this query, I get no results (cause the clientID in the order table only matches a record in clientsA OR in clientsB, never both)
I tried making a query which returns a list of ALL clients first, then using this query as a source for the order query. This way I do get the results I want, but I cannot edit those results (change the status) which is necessary. Anyone got an idea ?
Here is what the database kinda looks like, but when I make this query, I get no results (cause the clientID in the order table only matches a record in clientsA OR in clientsB, never both)
Code:
------------
| clientsA |
------------ ------------- ------------
| status | | orders | __| clientID |
------------ ------------- / | name |
| statusID |__ | orderID | / ------------
| status | \ | clientID |_/
------------ \__| statusID | \ ------------
------------- \ | clientsB |
\ ------------
\_| clientID |
| name |
------------