SELECT
*
FROM
webmaster AS base
LEFT JOIN tasks AS sub ON sub.fk_type = "webmaster"
WHERE
sub.fk_id != base.webmaster_id
AND
base.date != "1141758231"
AND
base.old != 1
ORDER BY
base.date
DESC
ok strange for me. there are 6 rows in tasks where fk_type = "webmaster" and sub.fk_id != base.webmaster_id so the 6 makes sence in a way. but why for every 1 row in base it returns it 6 times? What is wrong with that query?
edit: to clarify what I mean, I want it to return this
Who done it?
Who done it?
Who done it?
Who done it?
Who done it?
Who done it?
w4hweherh
w4hweherh
w4hweherh
w4hweherh
w4hweherh
blabla
blabla
blabla
blabla
blabla
blabla
SELECT
DISTINCT *
FROM
webmaster AS base
LEFT JOIN tasks AS sub
ON sub.fk_id != base.webmaster_id
WHERE
sub.fk_type = "webmaster"
AND
base.date != "1141758231"
AND
base.old != 1
ORDER BY
base.date
DESC
distinct has to take into account all the data found in the resulting record, so change the asterix to the field(s) you actually want to find information on.