<?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>Musings of a code slave &#187; MySQL</title>
	<atom:link href="http://foundationphp.com/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://foundationphp.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 04 Aug 2010 17:40:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DW CS5 with PHP book on Rough Cuts</title>
		<link>http://foundationphp.com/blog/2010/05/03/dw-cs5-with-php-book-on-rough-cuts/</link>
		<comments>http://foundationphp.com/blog/2010/05/03/dw-cs5-with-php-book-on-rough-cuts/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:01:23 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/?p=138</guid>
		<description><![CDATA[If you would like to get early access to my next book &#8220;Adobe Dreamweaver CS5 with PHP: Training from the Source&#8221;, the first six chapters (of 12) are now available as Rough Cuts in Creative Edge and Safari Books Online. &#8230; <a href="http://foundationphp.com/blog/2010/05/03/dw-cs5-with-php-book-on-rough-cuts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you would like to get early access to my next book <a title="See a detailed description of the book" href="/phpcs5/">&#8220;Adobe Dreamweaver CS5 with PHP:  Training from the Source&#8221;</a>, the first six chapters (of 12) are now  available as Rough Cuts in <a href="http://www.creativeedge.com/9780132117906">Creative Edge</a> and <a href="http://my.safaribooksonline.com/9780132117906">Safari  Books Online</a>.</p>
<p>If you have a Safari Library subscription, you can  view the chapters free of charge, and see new ones as they&#8217;re added.  Without a subscription, you can get access to the book in PDF format for  $34.99, including the finished ebook version when the book is complete.  You can also opt for the Rough Cuts PDF and Print bundle for $67.48.  The print version is expected to be released in early August.</p>
<p>The chapters currently available are Lessons 1-3 and 4-7, covering the following subjects:</p>
<ul>
<li>An in-depth look at all the PHP features in Dreamweaver CS5</li>
<li>Instructions for setting up a local PHP development environment</li>
<li>A quick PHP crash course (or refresher)</li>
<li>Creating your own database in MySQL</li>
<li>Using Dreamweaver server behaviors for automatic code generation</li>
<li>Building a robust user registration system with Zend_Validate and Zend_Db</li>
</ul>
<p>Chapters still to come concentrate heavily on using selected modules of the Zend Framework for sending email, uploading files, and building a content management system. (To avoid any misunderstanding, the book does not use the MVC design pattern—it follows what the ZF documentation calls &#8220;use at will&#8221; design, making use of individual components.)</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2010/05/03/dw-cs5-with-php-book-on-rough-cuts/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>New tutorials and articles</title>
		<link>http://foundationphp.com/blog/2010/01/23/new-tutorials-and-articles/</link>
		<comments>http://foundationphp.com/blog/2010/01/23/new-tutorials-and-articles/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 18:34:46 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[AJAX/JavaScript]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/?p=118</guid>
		<description><![CDATA[I have just added to my site a tutorial on converting a Spry Menu Bar into a server-side include. I have also been busy adding a bunch of brief articles to the Dreamweaver Cookbook on the Adobe site. I answer &#8230; <a href="http://foundationphp.com/blog/2010/01/23/new-tutorials-and-articles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have just added to my site a tutorial on <a href="/tutorials/sprymenu/ssi.php">converting a Spry Menu Bar into a server-side include</a>. I have also been busy adding a bunch of brief articles to the <a href="http://cookbooks.adobe.com/dreamweaver">Dreamweaver Cookbook on the Adobe site</a>.</p>
<p>I answer a lot of questions in the Dreamweaver forums, and realized that a lot of the solutions I was coming up with for people weren&#8217;t easy to find after a couple of days. So, rather than letting them disappear into cyberoblivion, I decided to add any of general interest to the cookbook when I had a few spare moments. The Dreamweaver Cookbook is intended for code samples, and doesn&#8217;t have the capability of including screenshots, so I&#8217;ll continue posting longer tutorials on my own site. But I hope you&#8217;ll find my contributions to the cookbook useful.</p>
<p>Here are direct links to some of the articles I have added to the Dreamweaver Cookbook:</p>
<ul>
<li><a href="http://cookbooks.adobe.com/post_Create_nested_lists_from_a_recordset__PHP_-16720.html">Create nested lists from a recordset</a></li>
<li><a href="http://cookbooks.adobe.com/post_Set_a_time_limit_on_a_login_session__PHP_-16701.html">Set a time limit on a login session</a></li>
<li><a href="http://cookbooks.adobe.com/post_Registration_system_that_requires_the_user_to_vali-16646.html">Registration system that requires the user to validate the email address</a> (in two parts)</li>
<li><a href="http://cookbooks.adobe.com/post_Alternate_colors_for_table_rows-16650.html">Alternate colours for table rows</a> (using PHP, Spry, or jQuery)</li>
<li><a href="http://cookbooks.adobe.com/post_Upload_image_to_website__PHP_-16389.html">Upload image to website</a></li>
<li><a href="http://cookbooks.adobe.com/post_Format_dates_for_entry_into_MySQL_using_PHP-16644.html">Format date for insertion into MySQL</a></li>
<li><a href="http://cookbooks.adobe.com/post_Format_dates_stored_in_MySQL-16641.html">Formatting dates stored in MySQL</a></li>
</ul>
<p>The Dreamweaver Cookbook is open to anyone to either request recipes or contribute recipes of their own. It could turn into a very useful resource if people start using it regularly. Check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2010/01/23/new-tutorials-and-articles/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New setup procedure for phpMyAdmin 3.1.x</title>
		<link>http://foundationphp.com/blog/2008/12/07/new-setup-procedure-for-phpmyadmin-31x/</link>
		<comments>http://foundationphp.com/blog/2008/12/07/new-setup-procedure-for-phpmyadmin-31x/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:52:07 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/?p=64</guid>
		<description><![CDATA[I seem to be jinxed with the way phpMyAdmin &#8220;celebrates&#8221; the publication of one of my books by changing its setup process. It happened twice with Foundation PHP for Dreamweaver 8. I updated the instructions between the first and second &#8230; <a href="http://foundationphp.com/blog/2008/12/07/new-setup-procedure-for-phpmyadmin-31x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I seem to be jinxed with the way <a title="Go to the phpMyAdmin site" href="http://phpmyadmin.net/">phpMyAdmin</a> &#8220;celebrates&#8221; the publication of one of my books by changing its setup process. It happened twice with <a title="Go to the book's description on my site" href="/dreamweaver8/"><em>Foundation PHP for Dreamweaver 8</em></a>. I updated the instructions between the first and second printings, but was caught out by a second change. Now it&#8217;s happened with <a title="Go to the book's description on my site" href="/dwcs4/"><em>The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP</em></a>. The book was published on 1 December, and on the very same day phpMyAdmin 3.1.0 was released, changing the setup procedure yet again.</p>
<p>I&#8217;ll create a full tutorial on the revised procedure when I get time, but you can find a summary of the main differences on the <a title="Go to the book's updates page" href="/dwcs4/updates.php">updates page for <em>The Essential Guide to Dreamweaver CS4</em></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2008/12/07/new-setup-procedure-for-phpmyadmin-31x/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Problem with PHP 5.2.7</title>
		<link>http://foundationphp.com/blog/2008/12/07/problem-with-php-527/</link>
		<comments>http://foundationphp.com/blog/2008/12/07/problem-with-php-527/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:35:32 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/?p=59</guid>
		<description><![CDATA[PHP 5.2.7, which was released last Thursday (4 December), has a bug that prevents &#8220;magic quotes&#8221; from working. If you rely on magic quotes, do not install PHP 5.2.7. Either revert to PHP 5.2.6 or wait until a fix is &#8230; <a href="http://foundationphp.com/blog/2008/12/07/problem-with-php-527/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>PHP 5.2.7, which was released last Thursday (4 December), has a bug that prevents &#8220;magic quotes&#8221; from working. If you rely on magic quotes, do <strong>not</strong> install PHP 5.2.7. <del datetime="2008-12-16T19:08:12+00:00">Either revert to PHP 5.2.6 or wait until a fix is released.</del> The bug has been fixed in <ins datetime="2008-12-16T19:08:12+00:00">PHP 5.2.8. </ins> <del datetime="2008-12-16T19:08:12+00:00">the &#8220;snapshot&#8221; version of PHP, which can be obtained at <a href="http://snaps.php.net/">http://snaps.php.net/</a></del></p>
<p>If you turn magic quotes off in PHP—which you should—you won&#8217;t be affected by this bug. It serves as a reminder that magic quotes are due to be removed in PHP 6. Magic quotes were originally introduced to make life &#8220;easier&#8221; for inexperienced developers by automatically inserting a backslash in front of single and double quotes in user input to prevent problems with database insertion. However, they have proved more trouble than they&#8217;re worth. Instead of magic quotes, you should use dedicated functions, such as <a title="See description of this function in the PHP online manual" href="http://docs.php.net/manual/en/function.mysql-real-escape-string.php">mysql_real_escape_string()</a>, or prepared statements with <a title="Go to the PHP online documentation" href="http://docs.php.net/manual/en/intro.mysqli.php">MySQLi</a> or <a title="Go to the PHP online documentation" href="http://docs.php.net/manual/en/book.pdo.php">PDO</a> to handle quotes and other special characters and protect your database from SQL injection attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2008/12/07/problem-with-php-527/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Changes in phpMyAdmin 3.0</title>
		<link>http://foundationphp.com/blog/2008/10/05/changes-in-phpmyadmin-30/</link>
		<comments>http://foundationphp.com/blog/2008/10/05/changes-in-phpmyadmin-30/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 09:20:29 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/?p=56</guid>
		<description><![CDATA[phpMyAdmin, the popular front-end to the MySQL database, has issued the first stable release of the version 3.0 series. The basic functionality remains unchanged, but there are some important differences. To begin with, phpMyAdmin 3.0 requires a minimum of PHP &#8230; <a href="http://foundationphp.com/blog/2008/10/05/changes-in-phpmyadmin-30/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>phpMyAdmin, the popular front-end to the MySQL database, has issued the first stable release of the version 3.0 series. The basic functionality remains unchanged, but there are some important differences. To begin with, phpMyAdmin 3.0 requires a minimum of PHP 5.2 and MySQL 5.0. Don&#8217;t try installing it with earlier versions of PHP or MySQL—it won&#8217;t work.</p>
<p>The main changes affecting the phpMyAdmin user interface concern the creation of new tables. They can be summarized as follows:</p>
<ul>
<li>When setting a default value for a column (field), you need to select a value from the drop-down menu. The options are <code>None</code>, <code>As defined</code>, <code>NULL</code>, or <code>CURRENT_TIMESTAMP</code>. If you select <code>As defined</code>, type the default value you want the column to have in the field immediately below.</li>
<li>As before, phpMyAdmin treats all columns as <code>NOT NULL</code>. In other words, all columns require a value to be inserted in them. To make a column optional, select the <code>Null</code> checkbox. In the version 2 series, this was a drop-down menu.</li>
<li>To set an index on a column, choose the appropriate index type from the <code>Index</code> drop-down menu. The choices are <code>PRIMARY</code>, <code>UNIQUE</code>, <code>INDEX</code>, and <code>FULLTEXT</code>. In the version 2 series, these were represented by radio buttons.</li>
<li>To create an auto incrementing column (normally used in conjunction with a primary key), select the <code>A_I</code> checkbox. In the version 2 series, this was a drop-down menu called <code>Extra</code>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2008/10/05/changes-in-phpmyadmin-30/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Adobe releases PHP hotfix for Dreamweaver 8.0.2</title>
		<link>http://foundationphp.com/blog/2006/08/28/adobe-releases-php-hotfix-for-dreamweaver-802/</link>
		<comments>http://foundationphp.com/blog/2006/08/28/adobe-releases-php-hotfix-for-dreamweaver-802/#comments</comments>
		<pubDate>Mon, 28 Aug 2006 22:58:12 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/2006/08/28/adobe-releases-php-hotfix-for-dreamweaver-802/</guid>
		<description><![CDATA[At long last, Adobe has released a hotfix for a number of serious issues affecting the PHP MySQL server model in Dreamweaver 8.0.2. Unfortunately, you can&#8217;t just go to the Adobe site and download it. You need to contact Adobe &#8230; <a href="http://foundationphp.com/blog/2006/08/28/adobe-releases-php-hotfix-for-dreamweaver-802/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At long last, Adobe has released a hotfix for a number of serious issues affecting the PHP MySQL server model in Dreamweaver 8.0.2. Unfortunately, you can&#8217;t just go to the Adobe site and download it. You need to contact Adobe support and ask for it. Officially, the reason is because Adobe wants to know how many people have been affected by the problems that it solves, and it wants to check that the solution &#8220;works for them&#8221;.</p>
<p>Anybody using my book <em><a href="http://foundationphp.com/dreamweaver8/">Foundation PHP for Dreamweaver 8</a></em> should get the hotfix pronto, as it solves two problems affecting Chapters 9 and 12:</p>
<ul>
<li>Without the hotfix, Dreamweaver 8.0.2 strips CONCAT() out of SQL queries.</li>
<li>Changes in the way PHP 5.1.4 and above handles XML resulted in the XSL Transformatiion server behavior reporting incorrectly that the source was not a valid XML document.</li>
</ul>
<p>The hotfix also solves a couple of other important problems, so if you have Dreamweaver 8.0.2 or have been putting off updating to 8.0.2, I strongly urge you to get in touch with Adobe support and get the hotfix. You can find full details in <a href="http://www.adobe.com/go/b6c2ae2a">this technote on the Adobe site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2006/08/28/adobe-releases-php-hotfix-for-dreamweaver-802/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>DATE_FORMAT() problem was with my data, not 8.0.2 updater</title>
		<link>http://foundationphp.com/blog/2006/05/14/date_format-problem-was-with-my-data-not-802-updater/</link>
		<comments>http://foundationphp.com/blog/2006/05/14/date_format-problem-was-with-my-data-not-802-updater/#comments</comments>
		<pubDate>Sun, 14 May 2006 13:08:34 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/2006/05/14/date_format-problem-was-with-my-data-not-802-updater/</guid>
		<description><![CDATA[When the Dreamweaver 8.0.2 updater came out, I originally reported that it mishandles the MySQL DATE_FORMAT() function in the Test SQL Statement panel. After further testing, and some help from Alexandru Costin of InterAKT, I&#8217;ve discovered the problem was with &#8230; <a href="http://foundationphp.com/blog/2006/05/14/date_format-problem-was-with-my-data-not-802-updater/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When the Dreamweaver 8.0.2 updater came out, I originally reported that it mishandles the MySQL DATE_FORMAT() function in the Test SQL Statement panel. After further testing, and some help from Alexandru Costin of InterAKT, I&#8217;ve discovered the problem was with the dates in a test table that I was using. Oops!</p>
<p>The dates had been entered incorrectly into the test table, so the actual values were 0000-00-00 00:00:00. No wonder that DATE_FORMAT() wasn&#8217;t able to convert them. However, the nasty problem with Dreamweaver 8.0.2 corrupting SQL queries that use CONCAT() has been confirmed by several people. Let&#8217;s hope it gets fixed soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2006/05/14/date_format-problem-was-with-my-data-not-802-updater/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Confusing changes in phpMyAdmin</title>
		<link>http://foundationphp.com/blog/2006/03/13/confusing-changes-in-phpmyadmin/</link>
		<comments>http://foundationphp.com/blog/2006/03/13/confusing-changes-in-phpmyadmin/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 15:22:58 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/2006/03/13/confusing-changes-in-phpmyadmin/</guid>
		<description><![CDATA[I love phpMyAdmin as a quick, easy-to-learn front-end for MySQL, but it&#8217;s just broken a cardinal rule of updates by making two changes to the installation procedure in the space of three months. In principle, the changes are well-intentioned. Instead &#8230; <a href="http://foundationphp.com/blog/2006/03/13/confusing-changes-in-phpmyadmin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://www.phpmyadmin.net/">phpMyAdmin</a> as a quick, easy-to-learn front-end for <a href="http://www.mysql.com/">MySQL</a>, but it&#8217;s just broken a cardinal rule of updates by making two changes to the installation procedure in the space of three months. In principle, the changes are well-intentioned. Instead of diving into an 800-odd line configuration file, users now have the choice of creating a simple text file themselves or using a web interface to build the configuration file automatically. The idea is that whenever you upgrade, you simply move your personal configuration file to the root folder, and everything works smoothly. It doesn&#8217;t&#8230;<span id="more-7"></span></p>
<p>The new system was introduced in version 2.7.0, but if you move the configuration file, config.inc.php, from 2.7.0 to 2.8.0, it doesn&#8217;t work! What&#8217;s particularly confusing is that MySQL reports that access was refused because the root password wasn&#8217;t used. After a bit of head scratching, I tried the new web interface to create config.inc.php for me. To my mind, the web interface is badly thought out. It&#8217;s counter-intuitive and time-consuming to use. Still, using the web interface did at least create a configuration file that worked &#8211; and that was the point of the exercise.</p>
<p>Looking inside to see the difference, it turns out that phpMyAdmin now uses an index of 1 instead of 0 to identify the primary server. I&#8217;ve no idea if this is a permanent change or just a mistake, but it certainly defeats the purpose of a configuration file intended to make upgrades easier if it breaks on a simple point upgrade.</p>
<p>I&#8217;ve updated my updates for <a href="http://foundationphp.com/dreamweaver8/updates.php"><em>Foundation PHP for Dreamweaver 8</em></a> and <a href="http://foundationphp.com/flash/updates.php"><em>Foundation PHP 5 for Flash</em></a>. The really annoying thing is that three pages were reset in the second printing of the Dreamweaver book to take account of the changes in phpMyAdmin 2.7.0. These latest changes now make the updated version already out of date. I don&#8217;t mind changes like this when they&#8217;re a clear improvement, but changing the installation procedure in 2.7.0 and breaking it in the very next release, just seems like sloppy management at phpMyAdmin</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2006/03/13/confusing-changes-in-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>MySQL strict mode problems</title>
		<link>http://foundationphp.com/blog/2006/02/26/mysql-strict-mode-problems/</link>
		<comments>http://foundationphp.com/blog/2006/02/26/mysql-strict-mode-problems/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 13:39:29 +0000</pubDate>
		<dc:creator>David Powers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://foundationphp.com/blog/2006/02/26/mysql-strict-mode-problems/</guid>
		<description><![CDATA[Simon Collison does such a good sales patter for ExpressionEngine in Blog Design Solutions that I decided to try it out. Things looked even brighter than his description when I disovered that not only has the price for the non-commercial &#8230; <a href="http://foundationphp.com/blog/2006/02/26/mysql-strict-mode-problems/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Simon's blog" href="http://www.collylogic.com/">Simon Collison</a> does such a good sales patter for <a href="http://www.pmachine.com/ee/">ExpressionEngine</a> in <em><a title="Read all about it - and then buy!" href="http://foundationphp.com/blogsolutions/">Blog Design Solutions</a></em> that I decided to try it out. Things looked even brighter than his description when I disovered that not only has the price for the non-commercial licence has gone down from $149 to $99, but there&#8217;s now also<a title="ExpressionEngine pricing and download link for Core" href="http://www.pmachine.com/ee/pricing/"> a &#8220;Core&#8221; version</a>, which is a free, unlimited trial. The free version lacks a lot of features, but it&#8217;s a good way to give ExpressionEngine a test drive without needing to worry about how many days you&#8217;ve got left to make up your mind whether to buy the paid-for version.</p>
<p>My enthusiasm took a sharp turn for the worse when the installation process failed at the last fence. I kept on getting the following message:</p>
<blockquote>
<p align="left">Error: Unable to perform the SQL queries needed to install this program. Please make sure your MySQL account has the proper GRANT privileges: CREATE, DROP, ALTER, INSERT, and DELETE.</p>
</blockquote>
<p align="left">I knew, however, that my account had all those privileges &#8211; and more.<span id="more-4"></span>Eventually, I dug into the code of the installation file, search for the error message, and did a little debugging to find out what lay behind this unexplained failure. I got the page to display the problem SQL query, and then ran it directly in MySQL Monitor. All became clear: the primary key of each table is set to auto_increment, and the ExpressionEngine installation script attempts to insert an empty string into the primary key field. In older versions of <a title="Highly popular open-source database system" href="http://www.mysql.com/">MySQL</a>, this works just fine, as the empty string is replaced by the next available number. In MySQL 5.0 running in SQL Strict Mode, though, this represents an out-of-range number, so the whole process comes to a grinding halt.</p>
<p align="left">The solution was simple: switch off SQL Strict Mode in MySQL. Although it didn&#8217;t take me all that long to work this out, I suspect it&#8217;s going to catch out a lot of MySQL beginners. SQL Strict Mode is now turned on by default in the Windows Essentials version of MySQL 5.0, and ExpressionEngine isn&#8217;t the only mainstream script to use an empty string for the primary key in INSERT commands. It&#8217;s also used by <a title="Popular front-end to MySQL" href="http://www.phpmyadmin.net/">phpMyAdmin</a>.</p>
<p align="left">So, for the time being, Windows Essentials users of MySQL should deselect the SQL Strict Mode option in the MySQL Configuration Wizard. A better solution, though, would be for everyone to start writing SQL commands that adhere to Strict Mode.</p>
]]></content:encoded>
			<wfw:commentRss>http://foundationphp.com/blog/2006/02/26/mysql-strict-mode-problems/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
