<?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[problema query con COUNT]]></title><description><![CDATA[<p dir="auto">Salve,<br />
scrivendo questa query:</p>
<pre><code class="language-php">$query = mysql_query('SELECT COUNT(id_livello) AS tot FROM tabella1');
</code></pre>
<p dir="auto">Mi fa il conteggio di tutta la tabella, come posso invece far si che mi controlla un altro campo? Es:</p>
<p dir="auto">tabella1 {id,id_livello,nome}</p>
<p dir="auto">Come posso fare il conteggio di id_livello che ha come nome = "pippo";</p>
<p dir="auto">Ho provato ad aggiungere WHERE nome ="pippo", ma esegue ugualmente il conteggio di tutta la tabella.<br />
Ho anche provato a fare 2 query<br />
e dentro al ciclo while della prima<br />
$query1 = mysql_query("SELECT * FROM tabella1 WHERE nome='pippo'");<br />
while ($res = mysql_fetch_array($query1)){$query = mysql_query('SELECT COUNT(id_livello) AS tot FROM tabella1');}</p>
<p dir="auto">Ma non cambia nulla,<br />
Dove sbaglio?<br />
Grazie mille</p>
]]></description><link>https://dev.connect.gt/topic/128572/problema-query-con-count</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 02:47:29 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/128572.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 May 2010 11:08:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to problema query con COUNT on Tue, 01 Jun 2010 12:07:51 GMT]]></title><description><![CDATA[<p dir="auto">ok,<br />
risolto grazie a tutti.<br />
Saluti<br />
Fabio</p>
]]></description><link>https://dev.connect.gt/post/914763</link><guid isPermaLink="true">https://dev.connect.gt/post/914763</guid><dc:creator><![CDATA[fabiettoko]]></dc:creator><pubDate>Tue, 01 Jun 2010 12:07:51 GMT</pubDate></item><item><title><![CDATA[Reply to problema query con COUNT on Tue, 01 Jun 2010 10:34:39 GMT]]></title><description><![CDATA[<pre><code class="language-php">$query = mysql_query("SELECT COUNT(id_livello) AS tot FROM tabella1 WHERE nome='pippo'");
</code></pre>
]]></description><link>https://dev.connect.gt/post/914755</link><guid isPermaLink="true">https://dev.connect.gt/post/914755</guid><dc:creator><![CDATA[amistat]]></dc:creator><pubDate>Tue, 01 Jun 2010 10:34:39 GMT</pubDate></item><item><title><![CDATA[Reply to problema query con COUNT on Mon, 31 May 2010 13:01:03 GMT]]></title><description><![CDATA[<p dir="auto">Ciao fabiettoko,</p>
<p dir="auto">fai attenzione alle maiuscole...<br />
È sufficiente aggiungere il where come da indicato per contare solo gli utenti con quel nome.</p>
]]></description><link>https://dev.connect.gt/post/914762</link><guid isPermaLink="true">https://dev.connect.gt/post/914762</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Mon, 31 May 2010 13:01:03 GMT</pubDate></item></channel></rss>