<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
<br>
Sorry, this is not strictly PHP, but its all the same kettle of fish.<br>
<br>
I'm working on a system that has companies, and these companies can
have activities and todos, defined something like:<br>
<br>
companies { <u>company_id</u>, name, etc... }<br>
todos { <u>todo_id</u>, <i>company_id</i>, etc... }<br>
activities { <u>activity_id</u>, <i>company_id</i>, etc... }<br>
<br>
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.<br>
<br>
Regards,<br>
<br>
Daniel<br>
<br>
</body>
</html>