<?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[[PHP][MySQL] Errore nella query]]></title><description><![CDATA[<p dir="auto">Salve a tutti,<br />
ottengo il seguente errore:<br />
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6</p>
<p dir="auto">nella seguente query:</p>
<pre><code class="language-php">//SELEZIONE TUTTE LE FOTO DEL CONTEST E VERIFICO SE C'E' IL FILTRO PER UTENTE
$filter_by_user = "AND CompetitorID = " . $getCurrentUser. " ";


$qq_foto = "SELECT 
                *
            FROM 
                works_2014
            WHERE 
                ContestID = " . $currentContest['ID'] . " " . $filter_by_user;


$q_foto = mysql_query($qq_foto) or die (mysql_error());
</code></pre>
<p dir="auto">secondo voi dov'è l'errore?</p>
<p dir="auto">Grazie.</p>
]]></description><link>https://dev.connect.gt/topic/209863/php-mysql-errore-nella-query</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 05:55:25 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/209863.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Jan 2015 11:43:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [PHP][MySQL] Errore nella query on Tue, 13 Jan 2015 19:07:18 GMT]]></title><description><![CDATA[<p dir="auto">Esatto, tramite l'ECHO mi sono accorto che il  $getCurrentUser non era valorizzato.</p>
<p dir="auto">Scusatemi e grazie! <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=12b9555a9a1" 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/1185141</link><guid isPermaLink="true">https://dev.connect.gt/post/1185141</guid><dc:creator><![CDATA[felino]]></dc:creator><pubDate>Tue, 13 Jan 2015 19:07:18 GMT</pubDate></item><item><title><![CDATA[Reply to [PHP][MySQL] Errore nella query on Tue, 13 Jan 2015 13:25:24 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>felino</strong></p>
<p dir="auto">Salve a tutti,<br />
ottengo il seguente errore:<br />
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6</p>
<p dir="auto">nella seguente query:</p>
<pre><code class="language-php">//SELEZIONE TUTTE LE FOTO DEL CONTEST E VERIFICO SE C'E' IL FILTRO PER UTENTE
$filter_by_user = "AND CompetitorID = " . $getCurrentUser. " ";
$qq_foto = "SELECT 
                *
            FROM 
                works_2014
            WHERE 
                ContestID = " . $currentContest['ID'] . " " . $filter_by_user;
$q_foto = mysql_query($qq_foto) or die (mysql_error());
</code></pre>
<p dir="auto">secondo voi dov'è l'errore?</p>
<p dir="auto">Grazie.</p>
</blockquote>
<p dir="auto">Forse è un problema di virgolette mancanti nei valori della query. Cosa ti riporta se fai un echo di $qq_foto?</p>
<pre><code class="language-php">//SELEZIONE TUTTE LE FOTO DEL CONTEST E VERIFICO SE C'E' IL FILTRO PER UTENTE
$filter_by_user = "AND CompetitorID = '" . $getCurrentUser. "' ";
$qq_foto = "SELECT 
                *
            FROM 
                works_2014
            WHERE 
                ContestID = '" . $currentContest['ID'] . "' " . $filter_by_user;
echo $qq_foto; // DEBUG
$q_foto = mysql_query($qq_foto) or die (mysql_error());
</code></pre>
<p dir="auto">Ti ho aggiunto anche le virgolette....</p>
]]></description><link>https://dev.connect.gt/post/1185142</link><guid isPermaLink="true">https://dev.connect.gt/post/1185142</guid><dc:creator><![CDATA[oslino]]></dc:creator><pubDate>Tue, 13 Jan 2015 13:25:24 GMT</pubDate></item></channel></rss>