User Tools

Site Tools


blogtngquery
SELECT DISTINCT A.pid
  FROM tags C, entries A LEFT JOIN comments B ON A.pid = B.pid
 WHERE A.blog IN ('foo', 'bar')
   AND A.pid = C.pid
   AND (
       C.tag = 'foo' OR
       C.tag = 'bar' OR
       A.title LIKE '%fffuuuu%' OR
       B.teext LIKE '%fffuuuu%'
   )
blogtngquery.txt · Last modified: 2009/11/06 17:03 by andi