<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Query Mysql che genera file Atom]]></title><description><![CDATA[<p dir="auto">Salve,</p>
<p dir="auto">uso un joomla 1.0 che produce sia un file rss che Atom 1.0 (utilizzando il componente com_rss/rss.php) che pesca però da tutte le sezioni. Ho sbirciato nel file e nella query che richiama i contenuti ho provato ad indicare solo alcune delle sezioni presenti nel sito ma purtroppo non succede nulla, vengono sempre selezionate tutte le sezioni.</p>
<p dir="auto">Riporto l'estratto del file dove c'è la query al db per l'estrazione dei contenuti:</p>
<p dir="auto">// query of frontpage content items<br />
$query = "SELECT a.*, <a href="http://u.name" rel="nofollow ugc">u.name</a> AS author, u.usertype, UNIX_TIMESTAMP( a.created ) AS created_ts, cat.title AS cat_title, sec.title AS section_title"<br />
. "\n FROM <a href="/hashtags/content">#__content</a> AS a"<br />
//. "\n INNER JOIN <a href="/hashtags/contentfrontpage">#__content_frontpage</a> AS f ON f.content_id = <a href="http://a.id" rel="nofollow ugc">a.id</a>"<br />
. "\n LEFT JOIN <a href="/hashtags/users">#__users</a> AS u ON <a href="http://u.id" rel="nofollow ugc">u.id</a> = a.created_by"<br />
. "\n LEFT JOIN <a href="/hashtags/categories">#__categories</a> AS cat ON <a href="http://cat.id" rel="nofollow ugc">cat.id</a> = a.catid"<br />
. "\n LEFT JOIN <a href="/hashtags/sections">#__sections</a> AS sec ON <a href="http://sec.id" rel="nofollow ugc">sec.id</a> = a.sectionid"<br />
. "\n WHERE a.state = 1"<br />
. "\n AND cat.published = 1"<br />
. "\n AND sec.published = 1"<br />
. "\n AND a.access = 0"<br />
. "\n AND cat.access = 0"<br />
. "\n AND sec.access = 0"<br />
. "\n AND ( a.publish_up = " . $database-&gt;Quote( $nullDate ) . " OR a.publish_up &lt;= " . $database-&gt;Quote( $now ) . " )"<br />
. "\n AND ( a.publish_down = " . $database-&gt;Quote( $nullDate ) . " OR a.publish_down &gt;= " . $database-&gt;Quote( $now ) . " )"<br />
. "\n ORDER BY $orderby"<br />
;<br />
$database-&gt;setQuery( $query, 0, $info[ 'count' ] );<br />
$rows = $database-&gt;loadObjectList();<br />
foreach ( $rows as $row ) {<br />
// title for particular item<br />
$item_title = htmlspecialchars( $row-&gt;title );<br />
$item_title = html_entity_decode( $item_title );</p>
<p dir="auto">Ho provato ad aggiungere dopo WHERE</p>
<p dir="auto">. "\n AND <a href="http://sec.id" rel="nofollow ugc">sec.id</a> = 1,3,7,14" (cioè solo alcune delle sezioni presenti nel sito) ma non succede nulla...</p>
<p dir="auto">Qualche suggerimento?</p>
<p dir="auto">Grazie mille e buon lavoro</p>
<p dir="auto">Nik</p>
]]></description><link>https://dev.connect.gt/topic/129942/query-mysql-che-genera-file-atom</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 10:49:02 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/129942.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Jun 2010 17:56:21 GMT</pubDate><ttl>60</ttl></channel></rss>