<?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>Ed&#039;s Blog &#187; MySQL</title>
	<atom:link href="http://edmundlong.com/edsBlog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://edmundlong.com/edsBlog</link>
	<description>Stuff I&#039;m working on at the moment</description>
	<lastBuildDate>Fri, 13 Aug 2010 10:58:36 +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>Setting up Apache, PHP 5 and MySQL on Leopard</title>
		<link>http://edmundlong.com/edsBlog/setting-up-apache-php-5-and-mysql-on-leopard/</link>
		<comments>http://edmundlong.com/edsBlog/setting-up-apache-php-5-and-mysql-on-leopard/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 22:54:25 +0000</pubDate>
		<dc:creator>edlong</dc:creator>
				<category><![CDATA[Archive Post]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://edmundlong.com/edsBlog/?p=82</guid>
		<description><![CDATA[Going to be a short blog post as Leopard has made this process very simple as PHP5 has been included as standard with the new OSX. First thing you need to do is open terminal and edit your http.conf file by typing: nano -sw /etc/apache2/httpd.conf Firstly you need to enable the php module. Search for [...]]]></description>
			<content:encoded><![CDATA[<p>Going to be a short blog post as Leopard has made this process very simple as PHP5 has been included as standard with the new OSX.</p>
<p>First thing you need to do is open terminal and edit your http.conf file by typing:</p>
<blockquote><p>nano -sw /etc/apache2/httpd.conf</p></blockquote>
<p>Firstly you need to enable the php module. Search for ‘php5_mod’ by typing it in when you press ctrl+w and press enter. This will bring you to a line with a hash before it….</p>
<blockquote><p>
#LoadModule php5_module libexec/apache2/libphp5.so</p></blockquote>
<p>Remove this hash to enable php5.</p>
<p>Next you need to setup your document root, i.e. the location your webserver will default to when you go to http://localhost. Search for ‘DocumentRoot’ within nano again by pressing Ctrl+w and hitting return. Alter the location (I think its Library/WebServer or something by default) to be whatever you wish your webserver root to be. I set it to be the Sites folder of the User I setup for Leopard.</p>
<p>Next you need to enable Apache, this is exceedingly easy. Go to System Preferences and then Sharing. Click the checkbox next to Web Sharing and apache should be ready to do. Put a sample html or php file(including is always a good way to test if php is working) in the document root and go to http://localhost and you should see the sample page.</p>
<p>Next you need to get MySQL. I got it here: <a href="http://mirrors.sunsite.dk/mysql/downloads/mysql/5.0.html#macosx-dmg">http://mirrors.sunsite.dk/mysql/downloads/mysql/5.0.html#macosx-dmg</a>.<br />
Follow the very easy steps in the package and you should be hunky-dorey!</p>
<div class="fullcircle-social-links" style="display: block;"></div><div style="clear: both;"></div>]]></content:encoded>
			<wfw:commentRss>http://edmundlong.com/edsBlog/setting-up-apache-php-5-and-mysql-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP dump, Beejive and MySQL tidbits</title>
		<link>http://edmundlong.com/edsBlog/php-dump-beejive-and-mysql-tidbits/</link>
		<comments>http://edmundlong.com/edsBlog/php-dump-beejive-and-mysql-tidbits/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 22:46:44 +0000</pubDate>
		<dc:creator>edlong</dc:creator>
				<category><![CDATA[Archive Post]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://edmundlong.com/edsBlog/?p=66</guid>
		<description><![CDATA[Hi, Haven’t had time to post recently and this is a relatively short one. I’ve been coding with PHP again recently and was looking for something similar to ColdFusions cfdump and didn’t know until last week that the var_dump function existed, its very handy although it doesn’t output the dumped variable in a very user-friendly [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Haven’t had time to post recently and this is a relatively short one.</p>
<p>I’ve been coding with PHP again recently and was looking for something similar to ColdFusions cfdump and didn’t know until last week that the var_dump function existed, its very handy although it doesn’t output the dumped variable in a very user-friendly fashion.</p>
<p>As I posted previously I jailbroke my iTouch and was looking for a good app for IM. I installed Apollo IM hearing that it was meant to be very good but it only has .Mac, MSN, AIM and one other I can’t remember, the main problem with the app is that there doesn’t seem to be Google Talk support. After looking around for a bit I found Beejive which is excellent, very nice to use but unfortunately only works from within Safari and isn’t a standalone app but will do for the moment. Check it out at <a href="http://www.beejive.com/">Beejive</a>.</p>
<p>I had this error during the week when doing some CF troubleshooting. I couldn’t figure it out for a while and the error message wasn’t especially helpful.</p>
<blockquote><p> Element 25316 is undefined in a Java object of type class coldfusion.runtime.TemplateProxy. </p></blockquote>
<p>The error occurred (I don’t know why I was doing this) when I was trying to index into a CF object as you would a struct! So if I had an object oObject and try to do something like oObject["someValue"] you will get an error like above.</p>
<p>Finally just a couple of quick really useful MYSQL snippets I picked up during the week. I needed to rename a MYSQL table, the SQL below does this nicely.</p>
<pre class="brush:sql">
rename table myOriginalTable TO newTableName;
</pre>
<p>Another really great piece of SQL performs an insert if a record doesn’t exist and if it does exist it performs an update on the record.</p>
<pre class="brush:sql">
INSERT INTO table (a,b,c) VALUES (1,2,3)
  ON DUPLICATE KEY UPDATE c=c+1;
</pre>
<p>Coalesce is a nice MYSQL function, it returns the first non-null in a list. If there is nothing besides NULL in the list, 1 is returned as in the case below.</p>
<pre class="brush:sql">
SELECT COALESCE(NULL,1) FROM tbl_test
</pre>
<div class="fullcircle-social-links" style="display: block;"></div><div style="clear: both;"></div>]]></content:encoded>
			<wfw:commentRss>http://edmundlong.com/edsBlog/php-dump-beejive-and-mysql-tidbits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
