<?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[stampare news]]></title><description><![CDATA[<p dir="auto">Ciao a tutti...tramite un pannello admin(nella cartella /admin) permetto all'amministratore del sito di inserire le news nel database..<br />
Poi come faccio a far visualizzare l'ultima news inserita nella home page del sito?<br />
GraziE!!</p>
]]></description><link>https://dev.connect.gt/topic/52864/stampare-news</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 00:42:41 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/52864.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Nov 2007 20:23:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to stampare news on Fri, 09 Nov 2007 15:41:32 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /> no problem.... l'importante e' che ci siamo riusciti</p>
]]></description><link>https://dev.connect.gt/post/633669</link><guid isPermaLink="true">https://dev.connect.gt/post/633669</guid><dc:creator><![CDATA[massimux]]></dc:creator><pubDate>Fri, 09 Nov 2007 15:41:32 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Fri, 09 Nov 2007 15:03:53 GMT]]></title><description><![CDATA[<p dir="auto">mi devo scusare con tutta la redazione e tutti gli utenti di questa discussione. Gli errori erano causati da una mia dimenticanza...<br />
Mi ero dimenticato la connessione al DATABASE.....<br />
Ciau!</p>
]]></description><link>https://dev.connect.gt/post/633677</link><guid isPermaLink="true">https://dev.connect.gt/post/633677</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Fri, 09 Nov 2007 15:03:53 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Thu, 08 Nov 2007 18:56:14 GMT]]></title><description><![CDATA[<p dir="auto">Ma io che cosa faccio con questo codice?? A me serve visualizzare una sola news...quella con id più vekkio...come fare dato ke (come si legge sopra) mi da errore??</p>
<pre><code class="language-php">$query = "select * from news ORDER BY id DESC limit 2";
$dbResult = mysql_query($query, $db);
$AffectedRows = mysql_affected_rows($db);
while ($dati = mysql_fetch_array($dbResult, MYSQL_ASSOC) and $i &lt; 2)  {
    $i++;
....
</code></pre>
]]></description><link>https://dev.connect.gt/post/633676</link><guid isPermaLink="true">https://dev.connect.gt/post/633676</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Thu, 08 Nov 2007 18:56:14 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 22:14:15 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>MZ</strong></p>
<p dir="auto">Ti Prende le ultime due:</p>
<pre><code class="language-php">$query = "select * from news ORDER BY id DESC limit 2";
$dbResult = mysql_query($query, $db);
$AffectedRows = mysql_affected_rows($db);
while ($dati = mysql_fetch_array($dbResult, MYSQL_ASSOC) and $i &lt; 2)  {
    $i++;
....
</code></pre>
</blockquote>
<p dir="auto">o mamma...ke vuol dire??che cosa è??</p>
]]></description><link>https://dev.connect.gt/post/633675</link><guid isPermaLink="true">https://dev.connect.gt/post/633675</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Wed, 07 Nov 2007 22:14:15 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 21:36:05 GMT]]></title><description><![CDATA[<p dir="auto">Ti Prende le ultime due:</p>
<pre><code class="language-php">$query = "select * from news ORDER BY id DESC limit 2";
$dbResult = mysql_query($query, $db);
$AffectedRows = mysql_affected_rows($db);
while ($dati = mysql_fetch_array($dbResult, MYSQL_ASSOC) and $i &lt; 2)  {
    $i++;
....
</code></pre>
<p dir="auto">facilmente ottimizzabile se devi prenderne di più..</p>
<p dir="auto">Vai tranquillo che funziona.</p>
]]></description><link>https://dev.connect.gt/post/633666</link><guid isPermaLink="true">https://dev.connect.gt/post/633666</guid><dc:creator><![CDATA[mz]]></dc:creator><pubDate>Wed, 07 Nov 2007 21:36:05 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 20:11:50 GMT]]></title><description><![CDATA[<p dir="auto">Questi gli errori.<br />
Primo codice:</p>
<pre><code>[B]Warning[/B]: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [B]C:\Programmi\EasyPHP 2.0b1\www\tapsos\index.php[/B] on line [B]24[/B]
Non ci sono news
</code></pre>
<p dir="auto">Secondo codice:</p>
<pre><code>[B]Warning[/B]: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [B]C:\Programmi\EasyPHP 2.0b1\www\tapsos\index.php[/B] on line [B]24[/B]
</code></pre>
<p dir="auto">Ciao!</p>
]]></description><link>https://dev.connect.gt/post/633673</link><guid isPermaLink="true">https://dev.connect.gt/post/633673</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Wed, 07 Nov 2007 20:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 17:22:22 GMT]]></title><description><![CDATA[<pre><code class="language-php">id=$_GET['id'];
  $testo=@mysql_query("SELECT * FROM news ORDER BY id_news DESC limit 1 ");
   $num=mysql_num_rows($testo);
if ($num&lt;1){
echo"Non ci sono news";
exit();
}
  $testoa=mysql_fetch_array($testo);
  $titolo=$testoa['titolo'];
  $text=$testoa['testo'];
  $datas=$testoa['data'];
  $text=htmlspecialchars($text);
</code></pre>
<p dir="auto">scrivi il codice in questo modo... altrimenti con almeno un record nel database scrivi questo e dimmi che ti mostra</p>
<pre><code class="language-php">id=$_GET['id'];
  $testo=@mysql_query("SELECT * FROM news ORDER BY id_news DESC limit 1 ");
 
  $testoa=mysql_fetch_array($testo);
  $titolo=$testoa['titolo'];
  $text=$testoa['testo'];
  $datas=$testoa['data'];
  $text=htmlspecialchars($text);
</code></pre>
]]></description><link>https://dev.connect.gt/post/633670</link><guid isPermaLink="true">https://dev.connect.gt/post/633670</guid><dc:creator><![CDATA[massimux]]></dc:creator><pubDate>Wed, 07 Nov 2007 17:22:22 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 14:13:29 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>massimux</strong></p>
<p dir="auto">quale?<br />
postate anche l'errore per cortesia!</p>
</blockquote>
<p dir="auto">Questo:</p>
<pre><code class="language-php">Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Programmi\EasyPHP 2.0b1\www\tapsos\index.php on line 24
Non è possibile trovare la news.
</code></pre>
<p dir="auto">Ciau</p>
]]></description><link>https://dev.connect.gt/post/633672</link><guid isPermaLink="true">https://dev.connect.gt/post/633672</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Wed, 07 Nov 2007 14:13:29 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 11:39:04 GMT]]></title><description><![CDATA[<p dir="auto">quale?<br />
postate anche l'errore per cortesia!</p>
]]></description><link>https://dev.connect.gt/post/633668</link><guid isPermaLink="true">https://dev.connect.gt/post/633668</guid><dc:creator><![CDATA[massimux]]></dc:creator><pubDate>Wed, 07 Nov 2007 11:39:04 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 11:37:49 GMT]]></title><description><![CDATA[<p dir="auto">no...mi da errore...non va!!!</p>
]]></description><link>https://dev.connect.gt/post/633681</link><guid isPermaLink="true">https://dev.connect.gt/post/633681</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Wed, 07 Nov 2007 11:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Wed, 07 Nov 2007 11:11:00 GMT]]></title><description><![CDATA[<p dir="auto">si dovrebbe andare <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://dev.connect.gt/post/633667</link><guid isPermaLink="true">https://dev.connect.gt/post/633667</guid><dc:creator><![CDATA[massimux]]></dc:creator><pubDate>Wed, 07 Nov 2007 11:11:00 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Tue, 06 Nov 2007 23:50:52 GMT]]></title><description><![CDATA[<p dir="auto">quindi faccio così??</p>
<pre><code class="language-php">id=$_GET['id'];
  $testo=@mysql_query("SELECT * FROM news ORDER BY id_news DESC limit 1 ");
  if(mysql_num_rows($testo)&lt;1)
   exit('Non è possibile trovare la news.');
   
  $testo=mysql_fetch_array($testo);
  $titolo=$testo['titolo'];
  $text=$testo['testo'];
  $datas=$testo['data'];
  $text=htmlspecialchars($text);
</code></pre>
]]></description><link>https://dev.connect.gt/post/633680</link><guid isPermaLink="true">https://dev.connect.gt/post/633680</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Tue, 06 Nov 2007 23:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Tue, 06 Nov 2007 23:46:04 GMT]]></title><description><![CDATA[<p dir="auto">si si...dovrebbe andare...dmn provo.:D<br />
grazie</p>
]]></description><link>https://dev.connect.gt/post/633679</link><guid isPermaLink="true">https://dev.connect.gt/post/633679</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Tue, 06 Nov 2007 23:46:04 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Tue, 06 Nov 2007 23:41:29 GMT]]></title><description><![CDATA[<p dir="auto">ho supposto che le news erano registrate in un db, supponendo che siano in "tabella", in quel modo prendi l'ultima inserita, supponendo ancora che ogni news abbia un id crescente, se vuoi le ultime 10 sostituisci 10 all'1.</p>
<p dir="auto">Ho fatto abbastanza supposizioni, se non hai gestito così le tue news facci sapere come ...</p>
]]></description><link>https://dev.connect.gt/post/633665</link><guid isPermaLink="true">https://dev.connect.gt/post/633665</guid><dc:creator><![CDATA[mz]]></dc:creator><pubDate>Tue, 06 Nov 2007 23:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Tue, 06 Nov 2007 23:23:52 GMT]]></title><description><![CDATA[<p dir="auto">così mi da solo la prima o tutte in ordine decrescente?<br />
mi puoi commentare l'istruzione per favore?</p>
]]></description><link>https://dev.connect.gt/post/633678</link><guid isPermaLink="true">https://dev.connect.gt/post/633678</guid><dc:creator><![CDATA[talkoman]]></dc:creator><pubDate>Tue, 06 Nov 2007 23:23:52 GMT</pubDate></item><item><title><![CDATA[Reply to stampare news on Tue, 06 Nov 2007 23:06:42 GMT]]></title><description><![CDATA[<p dir="auto">prova così:</p>
<pre><code class="language-php">select * from tabella ORDER BY id DESC limit 1
</code></pre>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=3abbd2034aa" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/633664</link><guid isPermaLink="true">https://dev.connect.gt/post/633664</guid><dc:creator><![CDATA[mz]]></dc:creator><pubDate>Tue, 06 Nov 2007 23:06:42 GMT</pubDate></item></channel></rss>