<?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>East Coast Interactive Ltd &#187; coldfusion</title>
	<atom:link href="http://www.eastcoastinteractive.co.uk/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eastcoastinteractive.co.uk</link>
	<description>Web development, design and multimedia</description>
	<lastBuildDate>Thu, 07 May 2009 11:58:33 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Basic query using ColdFusion or PHP</title>
		<link>http://www.eastcoastinteractive.co.uk/php/basic-query-using-coldfusion-or-php/</link>
		<comments>http://www.eastcoastinteractive.co.uk/php/basic-query-using-coldfusion-or-php/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 21:07:59 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=303</guid>
		<description><![CDATA[Following on from our previous post showing the process of removing spaces from strings with both ColdFusion and PHP, this example shows the process for querying some data and returning it to the browser as an unordered list. Again, a very basic example but one which shows how these two technologies handle the same thing.

so&#8230;ColdFusion.
in [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from our previous post showing the process of removing spaces from strings with both ColdFusion and PHP, this example shows the process for querying some data and returning it to the browser as an unordered list. Again, a very basic example but one which shows how these two technologies handle the same thing.<br />
<span id="more-303"></span><br />
so&#8230;ColdFusion.</p>
<p>in the ColdFusion Administrator set up your datasource &#8211; DATA &#038; SERVICES > Data Sources then type in the name of your datasource(we&#8217;ll call it something original&#8230;so, &#8220;test&#8221; it is then!), select the correct Driver and press &#8220;Add&#8221;, then just type in the name of your DB, the server(probably localhost) and the username and password thats your DB available to ColdFusion on your server, all you need to remember while writing your app is the datasource name.</p>
<p>A sample Query looks like so:</p>
<div class="codecolorer-container cfm " style="overflow:auto;white-space:nowrap;width:435px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="cfm codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc0">&lt;!--- connect to your datasource and select what you want:---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfquery</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;listData&quot;</span> <span class="kw6">datasource</span><span class="sy0">=</span><span class="st0">&quot;test&quot;</span><span class="sy0">&gt;</span></span><br />
&nbsp; &nbsp; select dataOne, dataTwo, dataThree<br />
&nbsp; &nbsp; from data<br />
<span class="sc5"><span class="sy0">&lt;/</span><span class="kw1">cfquery</span><span class="sy0">&gt;</span></span><br />
<br />
<span class="sc0">&lt;!---and output it in an unordered list:---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfoutput</span><span class="sy0">&gt;</span></span><br />
<span class="sc5"><span class="sy0">&lt;</span><a href="http://december.com/html/4/element/ul.html"><span class="kw2">ul</span></a><span class="sy0">&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc5"><span class="sy0">&lt;</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><span class="sc2">#dataOne#</span><span class="sc5"><span class="sy0">&lt;/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc5"><span class="sy0">&lt;</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><span class="sc2">#dataTwo#</span><span class="sc5"><span class="sy0">&lt;/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc5"><span class="sy0">&lt;</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><span class="sc2">#dataThree#</span><span class="sc5"><span class="sy0">&lt;/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a><span class="sy0">&gt;</span></span><br />
<span class="sc5"><span class="sy0">&lt;/</span><a href="http://december.com/html/4/element/ul.html"><span class="kw2">ul</span></a><span class="sy0">&gt;</span></span><br />
<span class="sc5"><span class="sy0">&lt;/</span><span class="kw1">cfoutput</span><span class="sy0">&gt;</span></span></div></td></tr></tbody></table></div>
<p>job done!</p>
<p>and so over to PHP&#8230;</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:435px;height:300px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<br />
<span class="co1">// first we need a connection to the DB</span><br />
<a href="http://www.php.net/mysql_connect"><span class="kw3">mysql_connect</span></a><span class="br0">&#40;</span><span class="st0">&quot;localhost&quot;</span><span class="sy0">,</span> <span class="st0">&quot;username&quot;</span><span class="sy0">,</span> <span class="st0">&quot;password&quot;</span><span class="br0">&#41;</span> or <a href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span><a href="http://www.php.net/mysql_error"><span class="kw3">mysql_error</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<a href="http://www.php.net/mysql_select_db"><span class="kw3">mysql_select_db</span></a><span class="br0">&#40;</span><span class="st0">&quot;myDatabase&quot;</span><span class="br0">&#41;</span> or <a href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span><a href="http://www.php.net/mysql_error"><span class="kw3">mysql_error</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="co1">// retrieve the required data</span><br />
<span class="re0">$getData</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="st0">&quot;SELECT dataOne, dataTwo, dataThree FROM data&quot;</span><span class="br0">&#41;</span><br />
or <a href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span><a href="http://www.php.net/mysql_error"><span class="kw3">mysql_error</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="co1">// and output into an unordered list</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;ul&gt;&quot;</span><span class="sy0">;</span><br />
<span class="kw1">while</span><span class="br0">&#40;</span><span class="re0">$row</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_fetch_array"><span class="kw3">mysql_fetch_array</span></a><span class="br0">&#40;</span><span class="re0">$getData</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;li&gt;&quot;</span><span class="sy0">.</span><span class="re0">$row</span><span class="br0">&#91;</span><span class="st_h">'dataOne'</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&quot;&lt;/li&gt;&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;li&gt;&quot;</span><span class="sy0">.</span><span class="re0">$row</span><span class="br0">&#91;</span><span class="st_h">'dataTwo'</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&quot;&lt;/li&gt;&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;li&gt;&quot;</span><span class="sy0">.</span><span class="re0">$row</span><span class="br0">&#91;</span><span class="st_h">'dataThree'</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&quot;&lt;/li&gt;&quot;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/ul&gt;&quot;</span><span class="sy0">;</span><br />
<br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>and there you have it, the same query returning the same data in both ColdFusion and PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eastcoastinteractive.co.uk/php/basic-query-using-coldfusion-or-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing spaces from a string with ColdFusion or php</title>
		<link>http://www.eastcoastinteractive.co.uk/php/removing-spaces-from-a-string-with-coldfusion-or-php/</link>
		<comments>http://www.eastcoastinteractive.co.uk/php/removing-spaces-from-a-string-with-coldfusion-or-php/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 13:11:58 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eastcoastinteractive.co.uk/?p=181</guid>
		<description><![CDATA[This is one of those little problems that pop up frequently and to show how it&#8217;s done in CFML as well as our other house language PHP, we&#8217;ve put these examples up for you. This method is using a regular expression.
To remove ALL the spaces from a string:
123456&#60;!--- set up a test variable ---&#62;
&#60;cfset mySpaceFilledString [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those little problems that pop up frequently and to show how it&#8217;s done in CFML as well as our other house language PHP, we&#8217;ve put these examples up for you. This method is using a regular expression.<span id="more-181"></span></p>
<p>To remove ALL the spaces from a string:</p>
<div class="codecolorer-container cfm " style="overflow:auto;white-space:nowrap;width:435px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="cfm codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc0">&lt;!--- set up a test variable ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfset</span> mySpaceFilledString <span class="sy0">=</span> <span class="st0">&quot; east coast interactive love coldfusion &quot;</span> <span class="sy0">/&gt;</span></span><br />
<span class="sc0">&lt;!--- remove ALL spaces from the string ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfset</span> mySpaceFreeVariable <span class="sy0">=</span> <span class="kw5">ReReplace</span><span class="br0">&#40;</span>mySpaceFilledString, <span class="st0">&quot;[[:space:]]&quot;</span>,<span class="st0">&quot;&quot;</span>,<span class="st0">&quot;ALL&quot;</span><span class="br0">&#41;</span><span class="sy0">&gt;</span></span><br />
<span class="sc0">&lt;!--- check it works ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfdump</span> <span class="kw4">var</span> <span class="sy0">=</span> #mySpaceFreeVariable#<span class="sy0">&gt;</span></span></div></td></tr></tbody></table></div>
<p>The above returns &#8220;eastcoastinteractivelovecoldfusion&#8221; &#8211; all spaces have been removed</p>
<p>And the PHP version</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:435px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<span class="co1">// set up a test variable</span><br />
<span class="re0">$mySpaceFilledString</span> <span class="sy0">=</span> <span class="st0">&quot; east coast interactive love php &quot;</span><span class="sy0">;</span><br />
<span class="co1">// remove all spaces from the string</span><br />
<span class="re0">$mySpaceFreeVariable</span> <span class="sy0">=</span> <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot; &quot;</span><span class="sy0">,</span> <span class="st0">&quot;&quot;</span><span class="sy0">,</span> <span class="re0">$mySpaceFilledString</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="co1">// check it works</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$mySpaceFreeVariable</span><span class="sy0">;</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>The above returns &#8220;eastcoastinteractivelovephp&#8221; &#8211; again, all spaces have been removed</p>
<p>To simply remove the spaces at the start and end of a string:</p>
<div class="codecolorer-container cfm " style="overflow:auto;white-space:nowrap;width:435px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="cfm codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc0">&lt;!--- set up a test variable ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfset</span> mySpaceFilledString <span class="sy0">=</span> <span class="st0">&quot; east coast interactive love coldfusion &quot;</span> <span class="sy0">/&gt;</span></span><br />
<span class="sc0">&lt;!--- remove spaces from start and end of the string ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfset</span> mySpaceFreeVariable <span class="sy0">=</span> <span class="kw5">Trim</span><span class="br0">&#40;</span>mySpaceFilledString<span class="br0">&#41;</span><span class="sy0">&gt;</span></span><br />
<span class="sc0">&lt;!--- check it works ---&gt;</span><br />
<span class="sc5"><span class="sy0">&lt;</span><span class="kw1">cfdump</span> <span class="kw4">var</span> <span class="sy0">=</span> #mySpaceFreeVariable#<span class="sy0">&gt;</span></span></div></td></tr></tbody></table></div>
<p>The above returns &#8220;east coast interactive love coldfusion&#8221; &#8211; spaces at the start and end have been removed only</p>
<p>And the PHP version</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:435px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<span class="co1">// set up a test variable</span><br />
<span class="re0">$mySpaceFilledString</span> <span class="sy0">=</span> <span class="st0">&quot; east coast interactive love php &quot;</span><span class="sy0">;</span><br />
<span class="co1">// remove spaces from start and end of the string</span><br />
<span class="re0">$myTrimmedVariable</span> <span class="sy0">=</span> <a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><span class="re0">$mySpaceFilledString</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="co1">//check it works</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$myTrimmedVariable</span><span class="sy0">;</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>The above returns &#8220;east coast interactive love php&#8221; &#8211; again, all spaces have been removed from the start and end only.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eastcoastinteractive.co.uk/php/removing-spaces-from-a-string-with-coldfusion-or-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coldfusion 8 Launches</title>
		<link>http://www.eastcoastinteractive.co.uk/coldfusion/coldfusion-8-launches/</link>
		<comments>http://www.eastcoastinteractive.co.uk/coldfusion/coldfusion-8-launches/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 07:52:46 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[coldfusion]]></category>

		<guid isPermaLink="false">http://www.ecinteractive.co.uk/blog/?p=24</guid>
		<description><![CDATA[The wait is over for the next major release of Coldfusion. Version 8 boasts some fantastic new features, integration with other technologies and some cool AJAX features, (we sneakily built a google suggest type application in about 30 minutes in our development environment for example). Go check it out here: http://www.adobe.com/products/coldfusion/
]]></description>
			<content:encoded><![CDATA[<p>The wait is over for the next major release of Coldfusion. Version 8 boasts some fantastic new features, integration with other technologies and some cool AJAX features, (we sneakily built a google suggest type application in about 30 minutes in our development environment for example). Go check it out here: <a href="http://www.adobe.com/products/coldfusion/" title="coldfusion 8">http://www.adobe.com/products/coldfusion/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.eastcoastinteractive.co.uk/coldfusion/coldfusion-8-launches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
