Hej,
Jag vill hämta alla data från 2 tabeller där kolumnen
consignee i tabellen
cust_invoice har siffran
8.
Med koden som nedan hämtas alla data, så jag har ju gjort något fel.
Kod:
("SELECT * FROM cust_invoice
LEFT JOIN consignee ON cust_invoice.consignee = consignee.id
UNION
SELECT * FROM cust_invoice
RIGHT JOIN consignee ON cust_invoice.consignee = consignee.id WHERE cust_invoice.consignee = 8 ");
Databasen är Mysql.