På fredag 14. juni 2013 kl. 01:10:51, skrev Luca Vernini <[email protected]>:
It works.
Also consider views.
Just used this on a my db:
SELECT * FROM tblcus_customer
INNER JOIN
( SELECT * FROM tblcus_customer_status WHERE status_id > 0) AS b
ON tblcus_customer.status = b.status_id
This query is the same as a normal JOIN:
SELECT *
FROM tblcus_customer
INNER JOIN
tblcus_customer_status b
ON tblcus_customer.status = b.status_id AND b.status_id > 0
orSELECT * FROM tblcus_customer INNER JOIN tblcus_customer_status b ON tblcus_customer.status = b.status_id WHERE b.status_id > 0But you can JOIN on SELECTs selecting arbitrary stuff.--
Andreas Joseph Krogh <[email protected]> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
