[Phpwm] SQL Problem
Daniel Davies
daniel at sitedesign.net
Thu Apr 3 15:58:01 BST 2008
Hello all,
Sorry, this is not strictly PHP, but its all the same kettle of fish.
I'm working on a system that has companies, and these companies can have
activities and todos, defined something like:
companies { _company_id_, name, etc... }
todos { _todo_id_, /company_id/, etc... }
activities { _activity_id_, /company_id/, etc... }
I'm trying to write a query which will only return companies that do NOT
have an activity or a todo in one query - my mind is blank! Maybe my
brain has been rotted by this system, but I can't think of a nice simple
way to do it. Any ideas? I've had some thoughts about using count, but
I'd like to check I'm not missing a simple solution before I start
writing elaborate queries.
Regards,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20080403/2995471a/attachment-0001.html
More information about the Phpwm
mailing list