<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022302" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022302</link>
    <description></description>
    <language>en</language>
          <item>
    <title>If I had a nickel</title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-being-distinctly-annoying#comment-1138823</link>
    <description> &lt;p&gt;I&#039;ve done that more than once.  The trick here is not to use the DISTINCT tag, but to use the GROUP BY directive.&lt;/p&gt;
&lt;p&gt;SELECT id, ordernumber, artist, title, location&lt;br /&gt;
FROM `data`&lt;br /&gt;
WHERE (content = &#039;tones&#039;) AND (status = &#039;top&#039;)&lt;br /&gt;
GROUP BY id&lt;br /&gt;
ORDER BY `id` DESC&lt;br /&gt;
LIMIT 0, 10&lt;/p&gt;
&lt;p&gt;if they have both entries have different id numbers then you&#039;d use&lt;br /&gt;
GROUP BY artist, title,location&lt;/p&gt;
&lt;p&gt;Hope that help, come to my website for more technical help...&lt;/p&gt;
&lt;p&gt;-Chris&lt;br /&gt;
Visit &lt;a href=&quot;http://www.bitesizeinc.net/&quot; class=&quot;bb-url&quot;&gt;http://www.bitesizeinc.net/&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 07 Oct 2003 00:40:49 +0000</pubDate>
 <dc:creator>christodd</dc:creator>
 <guid isPermaLink="false">comment 1138823 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-being-distinctly-annoying#comment-1137490</link>
    <description> &lt;p&gt;buggery... I tried that, but the problem, is that the ordernumber isnt &quot;DISTINCT&quot; is there anyway i can still retrieve the ordernumber, location and id fields while only getting distinct artist and title?&lt;/p&gt;
&lt;p&gt;I absolutly *have* to have the ordernumber as it needs to be passed through to allow the user to order the product or hear the demo.&lt;/p&gt;
&lt;p&gt;any ideas? I figured i could do another query to get the rest of the details, but thats just a pain in the arse and will slow the page down quite a chunk.&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;
 </description>
     <pubDate>Tue, 09 Sep 2003 12:39:52 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1137490 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-being-distinctly-annoying#comment-1137488</link>
    <description> &lt;p&gt;Thankyou! its strange, but distinct works with one value if you put it in brackets...&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SELECT DISTINCT(artist) ....&lt;/code&gt;&#039;&lt;/p&gt;
&lt;p&gt;I&#039;m not a MySQL wizard (yet - but I&#039;m getting there!) hence why there was a tremendous syntax error!&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;
 </description>
     <pubDate>Tue, 09 Sep 2003 08:33:46 +0000</pubDate>
 <dc:creator>andy206uk</dc:creator>
 <guid isPermaLink="false">comment 1137488 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/mysql-being-distinctly-annoying#comment-1137470</link>
    <description> &lt;p&gt;Isn&#039;t DISTINCT for duplicate entries? They have to be totally identical, though. Any variation and they aren&#039;t duplicates.&lt;/p&gt;
&lt;p&gt;I do find it somewhat amusing that the first thing is to blame mysql. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;SELECT DISTINCT artist, id, ordernumber, title, location FROM &lt;br /&gt;`data` WHERE (content = &amp;#039;tones&amp;#039;) AND (status = &amp;#039;top&amp;#039;) ORDER BY `id` DESC LIMIT 0, 10&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;I couldn&#039;t find anywhere that had brackets around the thing you want to be distinct. All items you have there will be distinct.&lt;/p&gt;
 </description>
     <pubDate>Mon, 08 Sep 2003 23:34:39 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137470 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
