<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySQL: Query Real Values from Delimiter-Separated-String-IDs</title>
	<atom:link href="http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/</link>
	<description>Freelance Web and Software Developer</description>
	<lastBuildDate>Mon, 09 Jan 2012 13:36:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-255</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Sat, 22 Oct 2011 15:48:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-255</guid>
		<description>no probs ;)</description>
		<content:encoded><![CDATA[<p>no probs <img src='http://www.slickdev.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vishal</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-254</link>
		<dc:creator>Vishal</dc:creator>
		<pubDate>Sat, 22 Oct 2011 13:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-254</guid>
		<description>HI,

Thanks for the code. :)</description>
		<content:encoded><![CDATA[<p>HI,</p>
<p>Thanks for the code. <img src='http://www.slickdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-223</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Fri, 08 Jul 2011 13:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-223</guid>
		<description>Hi,

Can you explain further with FULL TABLE SCAN?
This is the first time I encountered this.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Can you explain further with FULL TABLE SCAN?<br />
This is the first time I encountered this.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aidar</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-222</link>
		<dc:creator>aidar</dc:creator>
		<pubDate>Fri, 08 Jul 2011 13:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-222</guid>
		<description>Hi 
The 

SELECT value FROM my_table WHERE FIND_IN_SET(my_id, ′1, 2, 3′);

is not the same as

SELECT value FROM my_table WHERE my_id IN (’1′, ′2′, ′3′)

In first quiry FULL TABLE SCAN is required. This is not a solution for big tables</description>
		<content:encoded><![CDATA[<p>Hi<br />
The </p>
<p>SELECT value FROM my_table WHERE FIND_IN_SET(my_id, ′1, 2, 3′);</p>
<p>is not the same as</p>
<p>SELECT value FROM my_table WHERE my_id IN (’1′, ′2′, ′3′)</p>
<p>In first quiry FULL TABLE SCAN is required. This is not a solution for big tables</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-92</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Tue, 17 Nov 2009 04:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-92</guid>
		<description>yup that will do if not used in a query, but what I needed was the &#039;1, 2, 3&#039; to be used as part of a query :)</description>
		<content:encoded><![CDATA[<p>yup that will do if not used in a query, but what I needed was the &#8217;1, 2, 3&#8242; to be used as part of a query <img src='http://www.slickdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yk</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-91</link>
		<dc:creator>yk</dc:creator>
		<pubDate>Mon, 16 Nov 2009 22:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-91</guid>
		<description>The following code works for me:

SELECT value FROM my_table WHERE FIND_IN_SET(my_id, ′1, 2, 3′);

which is similar to the following code:

SELECT value FROM my_table WHERE my_id IN (’1′, ′2′, ′3′)</description>
		<content:encoded><![CDATA[<p>The following code works for me:</p>
<p>SELECT value FROM my_table WHERE FIND_IN_SET(my_id, ′1, 2, 3′);</p>
<p>which is similar to the following code:</p>
<p>SELECT value FROM my_table WHERE my_id IN (’1′, ′2′, ′3′)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-86</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Thu, 02 Jul 2009 05:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-86</guid>
		<description>thanks for the tip!
I might check into that this weekend. =)</description>
		<content:encoded><![CDATA[<p>thanks for the tip!<br />
I might check into that this weekend. =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Devia</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-85</link>
		<dc:creator>Carlos Devia</dc:creator>
		<pubDate>Wed, 01 Jul 2009 17:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-85</guid>
		<description>You should look at the function:
FIND_IN_SET

It could reduce the code needed.

Regards</description>
		<content:encoded><![CDATA[<p>You should look at the function:<br />
FIND_IN_SET</p>
<p>It could reduce the code needed.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-84</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Thu, 18 Jun 2009 08:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-84</guid>
		<description>Thanks Chaoz.  I&#039;m working with a MySQL procedure now that creates a temp table and it seems to be working as much as I should expect.  The real problem here is I don&#039;t have a scripting language.  It&#039;s a project at work, and we have fairly substandard systems; it&#039;s been a chore and a half just getting this to work with Excel and MS Query.  I think I&#039;ll have to go with a full php implementation, but I&#039;d rather not spend that much time on a company project (because I&#039;m a security guard for now).   Thank you again.</description>
		<content:encoded><![CDATA[<p>Thanks Chaoz.  I&#8217;m working with a MySQL procedure now that creates a temp table and it seems to be working as much as I should expect.  The real problem here is I don&#8217;t have a scripting language.  It&#8217;s a project at work, and we have fairly substandard systems; it&#8217;s been a chore and a half just getting this to work with Excel and MS Query.  I think I&#8217;ll have to go with a full php implementation, but I&#8217;d rather not spend that much time on a company project (because I&#8217;m a security guard for now).   Thank you again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaoz</title>
		<link>http://www.slickdev.com/2008/09/15/mysql-query-real-values-from-delimiter-separated-string-ids/comment-page-1/#comment-83</link>
		<dc:creator>Chaoz</dc:creator>
		<pubDate>Tue, 16 Jun 2009 09:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.slickdev.com/?p=54#comment-83</guid>
		<description>hi Jordan,

you cannot use the returned values as a resultset, its still a string but instead of the numbers separated by &quot;-&quot;, is now converted to your PhysicalZone names.

so example:

having ’001-002-003′ as your input... 

splitAndTranslate(’001-002-003′,’-&#039;) 

will return it into

’PhysicalZone1-PhysicalZone2-PhysicalZone3′

so its still a string.

What you want can be done via mysql Procedure, currently mysql Function does not do this.

Another way for you I can suggest is to get the PhysicalZone by using the function, split it by using your scripting language, (ex. php has &#039;explode&#039; function) then populate your &lt;b&gt;IN&lt;/b&gt; statement, then execute the query.

thanks</description>
		<content:encoded><![CDATA[<p>hi Jordan,</p>
<p>you cannot use the returned values as a resultset, its still a string but instead of the numbers separated by &#8220;-&#8221;, is now converted to your PhysicalZone names.</p>
<p>so example:</p>
<p>having ’001-002-003′ as your input&#8230; </p>
<p>splitAndTranslate(’001-002-003′,’-&#8217;) </p>
<p>will return it into</p>
<p>’PhysicalZone1-PhysicalZone2-PhysicalZone3′</p>
<p>so its still a string.</p>
<p>What you want can be done via mysql Procedure, currently mysql Function does not do this.</p>
<p>Another way for you I can suggest is to get the PhysicalZone by using the function, split it by using your scripting language, (ex. php has &#8216;explode&#8217; function) then populate your <b>IN</b> statement, then execute the query.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

