]> git.wh0rd.org - tt-rss.git/blame - help/1.php
new option: ALLOW_SELECT_UPDATE_METHOD (bump config ver)
[tt-rss.git] / help / 1.php
CommitLineData
0d32b41e 1<h1>Labels and SQL Expressions</h1>
01c9c74a 2
0d32b41e 3<p>Labels are generated by using SQL expressions. The &laquo;SQL expression&raquo; is added to WHERE clause of view feed query. You can match on ttrss_entries table fields and even use subselect to query additional information. This functionality is considered to be advanced and requires some understanding of SQL.</p>
01c9c74a
AD
4
5<h2>Examples</h2>
6
7<p>Match all unread articles:</p>
8
b44d8c51 9<code>unread = true</code>
01c9c74a
AD
10
11<p>Matches all articles which mention Linux in the title:</p>
12
b44d8c51 13<code>ttrss_entries.title like '%Linux%'</code>
01c9c74a 14
747885fc 15<p>Matches all articles for the last week (PostgreSQL):</p>
01c9c74a 16
b44d8c51 17<code>updated &gt; NOW() - INTERVAL '7 days'</code>
747885fc
AD
18
19<p>See the database schema <a target="_blank" href="http://tt-rss.org/trac/browser/schema/ttrss_schema_pgsql.sql">here</a> or included in the distribution package for gruesome details. The relevant tables are <b>ttrss_entries</b> and <b>ttrss_user_entries</b>.</p>
20
21<p class="insensitive">Feel free to post more clever examples of labels on Tiny
22Tiny RSS <a target="_blank" href="http://tt-rss.org/forum">forums</a>.</p>