<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dwight Jack Diary &#187; PHP database class</title>
	<atom:link href="http://www.dwightjack.com/diary/tag/php-database-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dwightjack.com/diary</link>
	<description>Diary of music, design and code</description>
	<lastBuildDate>Wed, 25 Jan 2012 21:52:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CRUDités: PHP5 class for MySQL database</title>
		<link>http://www.dwightjack.com/diary/2009/07/07/crudites-php5-class-for-mysql-database/</link>
		<comments>http://www.dwightjack.com/diary/2009/07/07/crudites-php5-class-for-mysql-database/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 07:00:05 +0000</pubDate>
		<dc:creator>Dwight Jack</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[CRUDités]]></category>
		<category><![CDATA[ezSQL]]></category>
		<category><![CDATA[MySQL class]]></category>
		<category><![CDATA[PHP database class]]></category>

		<guid isPermaLink="false">http://www.dwightjack.com/diary/?p=203</guid>
		<description><![CDATA[CRUDités is a set of handy methods to quickly manage many operations of writing, storing and deleting from and to MySQL databases]]></description>
			<content:encoded><![CDATA[<p>Even if nowadays many web developers prefer to use Frameworks such as Zend, CakePHP or CodeIgniter, we often have small coding tasks to do, that aren&#8217;t worth the cost of deploying a whole application structure.</p>
<h3>ezSQL</h3>
<p>When dealing with MySQL databases, one of the most used PHP class is <a href="http://www.woyano.com/jv/ezsql" target="_blank"><strong>ezSQL</strong></a>, by Justin Vincent. If you&#8217;ve never listen about it, just think that a slightly modified version of this class is used as the core of <strong>WordPress database library</strong>, and every time you query the database for a post, ezSQL comes in action.</p>
<p>Despite its effectiveness, ezSQL development seems to have stopped to version 2.04.</p>
<p>Since in my projects i often use this class to work with MySQL databases,<strong> i&#8217;ve written a small extension to the ezSQL_MySQL adapter</strong> to add shortcuts and more efficient functionalities to make further easier to manage databases&#8217; data with PHP. Here you are <strong>CRUDités</strong>.</p>
<h3>CRUDités: MySQL appetizer</h3>
<p><a title="CRUDités Homepage" href="http://www.dwightjack.com/projects/crudites/" target="_blank"><img class="alignright size-full wp-image-206" style="float:right;margin-left:10px" src="http://www.dwightjack.com/diary/wp-content/uploads/2009/07/logo.png" alt="CRUDités Logo" width="240" height="81" /></a></p>
<p><em>Crudités</em> are traditional French appetizers comprising sliced or whole raw vegetables. As of its name, CRUDités is just a set of <strong>handy methods</strong> to quickly manage many operations of writing, storing and deleting from and to MySQL databases.</p>
<p>Aside from the basic ezSQL methods, it adds some methods to <strong>build MySQL queries from strings and data arrays</strong>, new methods to retrieve datas from columns and rows, some utility methods and a whole <strong>new table binding system</strong>, to store table&#8217;s fields and quickly update and store new datas.<br />
For example you&#8217;ll be able to query a database and get a resulting array of rows just with this code:</p>
<pre><code>$rows = $db-&gt;get_data(array(
      'select' =&gt; 'id,name,surname',
      'from' =&gt; 'customer_names'
));
</code></pre>
<p>You can get more informations about the project by visiting its <strong><a href="http://www.dwightjack.com/projects/crudites/" target="_blank">main page</a></strong>, or you can directly download the class file by clicking here: <a href=http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=12>CRUDités (13.5 kB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwightjack.com/diary/2009/07/07/crudites-php5-class-for-mysql-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

