<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 14:46:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Giulio Pons' Blog: PHP to get enum/set values from mysql field]]></title>
      <guid>http://www.phpdeveloper.org/news/13884</guid>
      <link>http://www.phpdeveloper.org/news/13884</link>
      <description><![CDATA[<p>
<i>Giulio Pons</i> has <a href="http://www.barattalo.it/2010/01/19/php-to-get-enum-set-values-from-mysql-field/">a quick post</a> with a code snippet showing how to grab the possible values for an ENUM or SET field on a MySQL database.
</p>
<blockquote>
This function returns an array with the elements allowed in a ENUM or SET mysql field. This can be usefull if you're making some automation and need to retrieve those values without writing them in your code.
</blockquote>
<p>
The function uses the database's metadata to get the column information for a table and filter out the "enum" information from that. The column information includes the set of values possible and a few simple string handling functions make it easy to grab them. They could also be replaced by a regular expression or two to grab the same information more concisely.
</p>]]></description>
      <pubDate>Thu, 21 Jan 2010 11:14:26 -0600</pubDate>
    </item>
  </channel>
</rss>
