<?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>Thu, 24 May 2012 19:00:32 -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>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: CakePHP: Setting Default Values]]></title>
      <guid>http://www.phpdeveloper.org/news/5708</guid>
      <link>http://www.phpdeveloper.org/news/5708</link>
      <description><![CDATA[<p>
<i>Jonathan Snook</i> is back today with <a href="http://www.snook.ca/archives/php/cakephp_setting/">more information</a> gleaned from his voyages into the world of the CakePHP framework, this time focusing on setting up default values in your script.
</p>
<blockquote>
If you've got a user seeing a form for the first time, normally the fields are blank. But there are times where you want to prefill fields with data or preselect a certain option. Setting a default value turned out to be really straightforward.
</blockquote>
<p>
He <a href="http://www.snook.ca/archives/php/cakephp_setting/">includes the code</a> to make this "really straightforward" functionality happen. It's a simple seven line affair to make the value for the Project's name set to "Default Project Name". It uses the special "data" variable to push the value into, which, as he mentions later, is best set with a "$this->data" format as is in his example.
</p>]]></description>
      <pubDate>Wed, 28 Jun 2006 05:42:33 -0500</pubDate>
    </item>
  </channel>
</rss>

