Hello all
I have a query that retrieves a set of company data:
What I want to do is exclude a particular company by id, so I tried...Code:SELECT DISTINCT company, url, info, logosmall FROM company LEFT JOIN award_ceremony ON award_ceremony.sponsor=company.id WHERE award_ceremony.ceremony_id=8 ORDER BY company
Which to not much surprise on my part just caused an error.Code:SELECT DISTINCT company.id, company, url, info, logosmall FROM company LEFT JOIN award_ceremony ON award_ceremony.sponsor=company.id WHERE award_ceremony.ceremony_id=$currentid WHERE company.id NOT 5 ORDER BY company
Do I do this with a WHERE statement, in which case where does it go and what's the syntax?
Thanks in advance for any help.





Bookmarks