<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Retrieve valid entries for a MySQL ENUM/SET column</title>
	<link>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/</link>
	<description>Web Development Blog</description>
	<pubDate>Fri, 05 Sep 2008 22:22:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Passerby</title>
		<link>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-26768</link>
		<pubDate>Wed, 05 Mar 2008 15:46:11 +0000</pubDate>
		<guid>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-26768</guid>
					<description>None of the solutions suggest prior to this post have worked for me, so I came up with this:

preg_replace(&quot;/'\)$/&quot;, '', preg_replace(&quot;/^(enum&amp;#124;set)\('/&quot;, '', $fields))

Note: I'm using PHP 5.2.0 with mysqli functions

This function is a great idea though.  Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>None of the solutions suggest prior to this post have worked for me, so I came up with this:</p>
<p>preg_replace(&#034;/&#039;)$/&#034;, &#039;&#039;, preg_replace(&#034;/^(enum|set)(&#039;/&#034;, &#039;&#039;, $fields))</p>
<p>Note: I&#039;m using PHP 5.2.0 with mysqli functions</p>
<p>This function is a great idea though.  Thanks for sharing.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Domenico</title>
		<link>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-694</link>
		<pubDate>Fri, 18 Aug 2006 10:39:17 +0000</pubDate>
		<guid>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-694</guid>
					<description>This work for me:

preg_replace(&quot;/(?:enum&amp;#124;set)\('(.+?)'\)/&quot;,&quot;\\1&quot;, $fields)</description>
		<content:encoded><![CDATA[<p>This work for me:</p>
<p>preg_replace(&#034;/(?:enum|set)(&#039;(.+?)&#039;)/&#034;,&#034;\1&#034;, $fields)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Harvey A. Ramer</title>
		<link>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-378</link>
		<pubDate>Sat, 24 Jun 2006 13:46:59 +0000</pubDate>
		<guid>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-378</guid>
					<description>Thanks for this code snippet. It does exactly what I want!

I do have one small problem though. On my system the function returns  a string like this for the opening array value:

&lt;code&gt;
set('value
&lt;/code&gt;

And for the closing value it returns:

&lt;code&gt;
value')
&lt;/code&gt;

Do you have a quick suggestion for how to make the preg_replace function work? I'm on PHP 4.</description>
		<content:encoded><![CDATA[<p>Thanks for this code snippet. It does exactly what I want!</p>
<p>I do have one small problem though. On my system the function returns  a string like this for the opening array value:</p>
<p><code><br />
set('value<br />
</code></p>
<p>And for the closing value it returns:</p>
<p><code><br />
value')<br />
</code></p>
<p>Do you have a quick suggestion for how to make the preg_replace function work? I&#039;m on PHP 4.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: dan</title>
		<link>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-18</link>
		<pubDate>Wed, 11 Jan 2006 13:56:30 +0000</pubDate>
		<guid>http://www.jellyandcustard.com/2005/11/23/retrieve-valid-entries-for-a-mysql-enumset-column/#comment-18</guid>
					<description>Although it doesn't this doesn't affect the correctness of the script, there should be a semicolon after &quot;return $options&quot;</description>
		<content:encoded><![CDATA[<p>Although it doesn&#039;t this doesn&#039;t affect the correctness of the script, there should be a semicolon after &#034;return $options&#034;
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
