Taking a blind stab, how about..
SELECT a.name, minimum(0,COUNT(b.id)) as votes FROM poll_options as a LEFT
JOIN poll_votes as b on a.id=b.oid
WHERE b.pid='' GROUP BY b.oid
Ryan Fox
- Original Message -
From: "Blaster" <[EMAIL PROTECTED]>
> However! Here comes the problem, if no vote is
LEFT JOIN
On Sat, 11 Jan 2003 18:35:44 +0100, Blaster used a few
recycled electrons to form:
| Hey,
|
| (this post is pretty long, a short version of the problem is listed at the
| bottom if you don't like reading long emails :P)
|
| I'm currently going through all my SQL queries for my webpa
-
From: "Blaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 11, 2003 12:35 PM
Subject: SQL optimization problem
> Hey,
>
> (this post is pretty long, a short version of the problem is listed at the
> bottom if you don't like readin