User Tools

Site Tools


blogtngquery
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


blogtngquery [2009/11/06 17:03] (current) – created andi
Line 1: Line 1:
  
 +
 +<code sql>
 +
 +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%'
 +   )
 +
 +</code>
blogtngquery.txt · Last modified: 2009/11/06 17:03 by andi