User Tools

Site Tools


blogtngquery

Differences

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

Link to this comparison view

blogtngquery [2009/11/06 18:03] (current)
andi created
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 18:03 by andi