<?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 con OR &amp; AND]]></title><description><![CDATA[<p dir="auto">Ho un problemio con una query..</p>
<p dir="auto">Eccola :</p>
<pre><code class="language-php">SELECT * FROM tea_bookings WHERE data_arr ='2007-8-31' AND ( site_id='AEGPLA' OR site_id='AEOVIL' OR site_id='AKSHIN' OR site_id='HOTGIA' )
</code></pre>
<p dir="auto">In pratica devo controllare se nel DB è presente un record che abbia quella data nel campo data_arr ma che contemporaneamente nel campo site_id ci sia uno di quei 4 codici..solo che non riesco a farla!</p>
<p dir="auto">Qualcuno mi da una mano??</p>
]]></description><link>https://dev.connect.gt/topic/50376/query-con-or-amp-and</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 19:02:55 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/50376.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 Oct 2007 12:54:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Query con OR &amp; AND on Sun, 14 Oct 2007 21:56:39 GMT]]></title><description><![CDATA[<p dir="auto">Ciao Samleo,<br />
la tua query sembra ok, potresti anche scriverla così:</p>
<p dir="auto">SELECT * FROM tea_bookings<br />
WHERE data_arr = '2007-08-31'<br />
AND site_id in ('AEGPLA','AEOVIL','AKSHIN','HOTGIA')</p>
<p dir="auto">Potrebbe essere che il tuo problema è che data_arr type non é date<br />
opure site_id non è char.</p>
<p dir="auto">Oppure che il tuo date contiene anche un timestamp e quindi non coindice con quello che cerchi di confrontare, in quel caso potresti provare così:</p>
<p dir="auto">WHERE data_arr &gt;= '2007-08-31' AND data_arr &lt; '2007-09-01'</p>
]]></description><link>https://dev.connect.gt/post/619188</link><guid isPermaLink="true">https://dev.connect.gt/post/619188</guid><dc:creator><![CDATA[jantima]]></dc:creator><pubDate>Sun, 14 Oct 2007 21:56:39 GMT</pubDate></item></channel></rss>