I did a little testing, and this should work better:
Select...
From...
group by taggings.id
HAVING GROUP_CONCAT('name') like 'soup'
AND GROUP_CONCAT('name') like 'vegetarian'
Simcha Younger
-----Original Message-----
From: Catharsis [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2008 6:44 PM
To: [email protected]
Subject: RE: [PHP-DB] Delicious style Tags table
Simcha Younger-2 wrote:
>
> If there is only one search term - "soup" your where statement would be:
> Where `name` like 'soup'
>
> But you need two matches, and the terms are "soup", "vegetarian". Try:
> Where GROUP_CONCAT('name') like 'soup'
> AND GROUP_CONCAT('name') like 'vegetarian'
> group by taggings.id
>
You might be onto something, couldn't get your suggestion to work out the
box but after looking at the docs
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_grou
p-concat
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php