snowboardr
Programmer
Is it possible to do this?
Code:
SELECT
files.aid, files.atitle, files.adesc, files.asize, files.aonline, files.adate, files.privemployee, files.privnotemployee, files.privuseprivs,
privs.pid, privs.puid, privs.pfid, privs.priv1 FROM files
LEFT JOIN on
CASE WHEN files.privuseprivs=1 THEN privs.pfid=files.aid
CASE WHEN files.privemployee=1 THEN privs.puid=1
CASE WHEN files.privnotemployee=1 THEN privs.puid=2
ORDER by aid DESC Limit 0,20