<?xml version="1.0" encoding="utf-8"?><rss version="2.0">
	<channel>
		<title>miPHP :: Blog</title>
		<link>http://www.miphp.net/</link>
		<description>A personal blog by Bret Kuhns about php, school, and life.</description>
		<language>en-us</language>
			
			<item>
				<guid>http://www.miphp.net/blog/view/Akismet+PEAR+Package</guid>
				<title>Akismet PEAR Package</title>
				<link>http://www.miphp.net/blog/view/Akismet+PEAR+Package</link>
				<description>Thanks to Michael Gauthier from &lt;a href=&quot;http://www.silverorange.com/&quot;&gt;silverorange&lt;/a&gt;, the Akismet class has been converted to PHP5 and significantly tweaked. Michael submitted his changes to &lt;a href=&quot;http://pear.php.net/&quot;&gt;PEAR&lt;/a&gt;, and it is now an &lt;a href=&quot;http://pear.php.net/package/Services_Akismet&quot;&gt;available package&lt;/a&gt; in the repository. Please &lt;a href=&quot;http://pear.php.net/package/Services_Akismet&quot;&gt;check it out&lt;/a&gt; if you're looking for a good PHP5 class with the much less restrictive MIT license!</description>
				<pubDate>Mon, 07 Apr 2008 08:55:19 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/CSS+and+Javascript+Compression</guid>
				<title>CSS and Javascript Compression</title>
				<link>http://www.miphp.net/blog/view/CSS+and+Javascript+Compression</link>
				<description>&lt;h2&gt;Introduction&lt;/h2&gt;&lt;br /&gt;
I've been using Javascript more and more ever since I discovered the wonderful &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; framework. Though jQuery comes in a much smaller file size than Prototype, it's still quite a bit to ask of your dial-up users to download before the rest of your Javascript even loads. I also noticed a CSS file of mine was up to 8kB in size. I decided it was time to figure out a way to compress things down a bit. This is where my CSS and Javascript compression script comes in. Along with a little mod_rewrite magic, all the CSS/JS files on my client's website are automagically compressed and gzipped before sent to the site's visitors. File caching is included to reduce the processing time overhead from compression. A few options are also available for development to make life easier. It's hard to debug CSS when everything has been compacted into a single line, so adding &amp;amp;debug to the end of the path will revert back to the CSS file's original state so that you can browse through it (especially handy if you use the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/60&quot;&gt;web developer toolbar&lt;/a&gt;). Using the compression script, my CSS file went from 8kB to 2kB, and jQuery from 95kB to 15kB!&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Usage&lt;/h2&gt;&lt;br /&gt;
Simply configure the constants at the beginning of the PHP file to suite your server appropriately. Now change the paths in your HTML to any CSS or Javascript file you'd like to compress (ie: from &amp;quot;/inc/style.css&amp;quot; to &amp;quot;c.php?f=inc/style.css&amp;quot;).&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt; Using mod_rewrite&lt;/h2&gt;&lt;br /&gt;
You can use mod_rewrite to compress everything automatically: &lt;code&gt; &amp;lt;IfModule mod_rewrite.c&amp;gt;&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteEngine On&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteRule ^(.*)\.(js|css)(.*)?$ inc/c.php?f=$1.$2$3&lt;br /&gt;&lt;br /&gt;
&amp;lt;/IfModule&amp;gt; &lt;/code&gt;Now going to &amp;quot;/inc/style.css&amp;quot; will automatically compact the CSS file and it will be Gzip compressed before being sent to your browser (provided your browser supports Gzip compression). Using this technique, you shouldn't have to change anything else on your site and everything will be compressed automatically.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Download&lt;/h2&gt;&lt;br /&gt;
Added Mar 11, 2008&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://joliclic.free.fr/php/javascript-packer/en/&quot;&gt;PHP Javascript Packer&lt;/a&gt; (modify &amp;quot;require&amp;quot; line in c.php if needed)&lt;br /&gt;&lt;br /&gt;
    &lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.miphp.net/files/code/c.zip&quot;&gt;c.zip&lt;/a&gt; or&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.miphp.net/files/code/c.tar.gz&quot;&gt;c.tar.gz&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;</description>
				<pubDate>Tue, 11 Mar 2008 12:20:10 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/The+Bane+of+Interpreted+Languages</guid>
				<title>The Bane of Interpreted Languages</title>
				<link>http://www.miphp.net/blog/view/The+Bane+of+Interpreted+Languages</link>
				<description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://xkcd.com/&quot;&gt;&lt;img style=&quot;border: 1px solid rgb(17, 51, 102);&quot; src=&quot;/img/blog/compiling.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
I can't help but think of all the chair fights I'm missing out on... blasted PHP!</description>
				<pubDate>Fri, 22 Feb 2008 09:06:59 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/Bazaar%2C+version+control+made+easy</guid>
				<title>Bazaar, version control made easy</title>
				<link>http://www.miphp.net/blog/view/Bazaar%2C+version+control+made+easy</link>
				<description>I've attempted in the past to use a &lt;a href=&quot;http://en.wikipedia.org/wiki/Revision_control&quot;&gt;version control system&lt;/a&gt; to manage my projects big and small; from the single &lt;a href=&quot;http://miphp.net/blog/view/new_akismet_class&quot;&gt;Akismet class&lt;/a&gt; file, to much larger client projects with thousands of lines of code. &lt;a href=&quot;http://en.wikipedia.org/wiki/Concurrent_Versions_System&quot;&gt;CVS&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Subversion_(software)&quot;&gt;SVN&lt;/a&gt; however, were just too much for me. The learning curve was too high to make it worth the effort and I ended up giving up and sticking to my old ways. But one day I stumbled upon another version control system, &lt;a href=&quot;http://bazaar-vcs.org/&quot;&gt;Bazaar&lt;/a&gt;. This system is different in that it is able to tailor to the small single-man projects that I typically work on, but is also designed to scale to much larger multi-developer projects as well. Within a few minutes of installing it on my web host, I had a running code repository that I could submit revisions to and keep track of my work. I can now revert any or all files to previous revisions of a project if needed. I also have a useful journal/log of my progress in a project from each time I commit a revision. It's quick, simple, and gets the job done for developers like me. I highly recommend &lt;a href=&quot;http://bazaar-vcs.org/&quot;&gt;Bazaar&lt;/a&gt; if you're looking for a simple, yet powerful revision system.</description>
				<pubDate>Thu, 31 Jan 2008 08:03:38 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/Skipjack+API+Class</guid>
				<title>Skipjack API Class</title>
				<link>http://www.miphp.net/blog/view/Skipjack+API+Class</link>
				<description>A friend of mine, &lt;a href=&quot;http://stevenvondruska.com/&quot;&gt;Steven Vondruska&lt;/a&gt;, wrote a &lt;a href=&quot;http://www.skipjack.com/&quot;&gt;Skipjack&lt;/a&gt; class that he kindly let me use for a project of my own. He wrote the class a while back and we've both since become better programmers, so I decided to update the code a bit before using it.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Overview&lt;/h2&gt;&lt;br /&gt;
This Skipjack class will allow you to easily connect to the Skipjack API, submit credit card information, and determine if the transaction has been approved or not by Skipjack.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Download&lt;/h2&gt;&lt;br /&gt;
Added Jan 24, 2008&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://miphp.net/files/code/skipjack.zip&quot;&gt;skipjack.zip&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://miphp.net/files/code/skipjack.tar.gz&quot;&gt;skipjack.tar.gz&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h2&gt; Usage&lt;/h2&gt;&lt;br /&gt;
&lt;code&gt;require_once 'skipjack.php';&lt;br /&gt;&lt;br /&gt;
sj = new Skipjack(); &lt;br /&gt;&lt;br /&gt;
$sj-&amp;gt;setDeveloper(true); // use the development server address, remove this line to use the live server&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
$sj-&amp;gt;addFields(array(&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'OrderNumber' =&amp;gt; '5', &lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'ItemNumber' =&amp;gt; 'i5', &lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'ItemDescription' =&amp;gt; 'Test Item',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'ItemCost' =&amp;gt; '5.50',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'Quantity' =&amp;gt; '1',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'Taxable' =&amp;gt; '0',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'AccountNumber' =&amp;gt; '4445999922225', &lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'Month' =&amp;gt; '12',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'Year' =&amp;gt; '2010',&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 'TransactionAmount' =&amp;gt; '200.00'&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ));&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
if($sj-&amp;gt;process() &amp;amp;&amp;amp; $sj-&amp;gt;isApproved()) { &lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &amp;quot;Transaction approved!&amp;quot;;&lt;br /&gt;&lt;br /&gt;
} else {&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &amp;quot;Transaction declined!\n&amp;quot;;&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $sj-&amp;gt;getErrors();&lt;br /&gt;&lt;br /&gt;
} &lt;br /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
Please review the file itself for other useful methods written in the class.</description>
				<pubDate>Thu, 24 Jan 2008 09:56:58 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/How+I+got+Linux+back+on+my+desktop</guid>
				<title>How I got Linux back on my desktop</title>
				<link>http://www.miphp.net/blog/view/How+I+got+Linux+back+on+my+desktop</link>
				<description>Roughly a year ago, &lt;a href=&quot;http://www.miphp.net/blog/view/why_linux_lost&quot;&gt;Linux was no longer&lt;/a&gt; the primary OS running on my desktop. My daily computing has moved to my laptop, which has &lt;a href=&quot;http://www.miphp.net/blog/view/linux_is_back&quot;&gt;happily run Ubuntu&lt;/a&gt; for about a year now. However, after hearing news of improvements in the HP Linux print driver, it seemed I might be able to get Linux back on my desktop and still have the printer shared to the other Windows laptops around the house. Here's my checklist of features I needed that I've had setup in Windows for quite some time. Without all of the things listed, there'd be no hope of Linux staying on the desktop.&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
    &lt;li&gt;FTP access&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;Remote VNC access&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;Network shares&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;Print server&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;Torrent web UI&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;DNLA / UPnP media server&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;Folding@home&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h2&gt;FTP / VNC / Samba&lt;/h2&gt;&lt;br /&gt;
Now, being Linux, some of these things are available right off the line. Thanks to the Synaptic Package Manager and a couple quick google queries, it wasn't long before FTP, VNC, Samba, and SSH daemons were up and running.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;The Printer&lt;/h2&gt;&lt;br /&gt;
Next up was the big hurdle of sharing the HP PSC 1210xi printer. I simply couldn't get this working last March with Edgy Eft. But with a quick search on google, I found &lt;a href=&quot;http://ubuntuforums.org/archive/index.php/t-405543.html&quot;&gt;a solution&lt;/a&gt; to my problem that was so simple it was almost silly. The printer always shared fine from Ubuntu, but Windows just couldn't connect to it because of the truly cumbersome drivers provided from HP. It turns out that you can connect to the printer from Windows by using any generic HP driver. Once the printer is installed, go to the advanced printer properties and select the proper &amp;quot;PSC 1200 series&amp;quot; driver that Windows now magically recognizes. After that, networked printing worked like a charm!&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Torrent Web UI&lt;/h2&gt;&lt;br /&gt;
Not long ago, an easily installed web UI to a bit torrent client wasn't too likely. Fortunately, my favorite Linux bit torrent client &lt;a href=&quot;http://deluge-torrent.org/&quot;&gt;Deluge&lt;/a&gt; added a web UI plugin. Activate the included plugin after installing the .deb from their site and you're ready to go.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;DNLA / UPnP&lt;/h2&gt;&lt;br /&gt;
I had serious doubts an open source solution for streaming audio/pictures/videos to my Playstation 3 from my desktop existed. However, &lt;a href=&quot;http://fuppes.ulrich-voelkel.de/&quot;&gt;Fuppes&lt;/a&gt; turned out to be the perfect solution. The Fuppes &lt;a href=&quot;http://fuppes.ulrich-voelkel.de/wiki/index.php/Main_Page&quot;&gt;wiki&lt;/a&gt; includes instructions for installing everything in Ubuntu, making everything a cinch. If you plan to &lt;a href=&quot;http://fuppes.ulrich-voelkel.de/wiki/index.php/Sony_Playstation_3&quot;&gt;stream to the PS3&lt;/a&gt;, make sure to check the wiki for specifics on how to handle certain AVI transcoding.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt;Folding@home&lt;/h2&gt;&lt;br /&gt;
I've taken an interest in contributing to the &lt;a href=&quot;http://folding.stanford.edu/&quot;&gt;Folding@home&lt;/a&gt; project. I've had the F@h client running on my desktop in Windows, so I wanted to continue in Linux. The Ubuntu wiki has a &lt;a href=&quot;https://help.ubuntu.com/community/FoldingAtHome&quot;&gt;great tutorial&lt;/a&gt; and I personally used the &lt;a href=&quot;https://help.ubuntu.com/community/FoldingAtHome/finstall&quot;&gt;finstall&lt;/a&gt; option which worked perfectly.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
After only a couple days of setup, my desktop now handles everything I need thanks to free and open source software.</description>
				<pubDate>Sun, 20 Jan 2008 17:11:04 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/cakePHP+helper+for+jQuery+Validation+plugin</guid>
				<title>cakePHP helper for jQuery Validation plugin</title>
				<link>http://www.miphp.net/blog/view/cakePHP+helper+for+jQuery+Validation+plugin</link>
				<description>I've been working on a page that needs some heavy validation. I decided to take advantage of the &lt;a href=&quot;http://bakery.cakephp.org/articles/view/improved-advance-validation-with-parameters&quot;&gt;Improved Advanced Validation&lt;/a&gt; method in cakePHP for server-side and the jQuery &lt;a href=&quot;http://docs.jquery.com/Plugins/Validation&quot;&gt;Validation plugin&lt;/a&gt; for client-side. After changing error messages in both the Model and inside my View, I decided to make a way for the messages defined in the Model to automatically define the messages in the View.&amp;nbsp; So, I wrote a helper that makes this possible.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h2&gt; How To&lt;/h2&gt;&lt;br /&gt;
First, download the helper:&lt;br /&gt;&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://miphp.net/files/code/jquery_validation.zip&quot;&gt;jquery_validation.zip&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
    &lt;li&gt;&lt;a href=&quot;http://miphp.net/files/code/jquery_validation.tar.gz&quot;&gt;jquery_validation.tar.gz&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
After putting jquery_validation.php in your helpers folder, and your model follows the advanced validation convention for the Model::$validate array, you can use the following code when setting up the validation plugin in your view: &lt;code&gt; &amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(function(){&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&amp;quot;#registerForm&amp;quot;).validate({&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; messages: {&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?=$jqueryValidation-&amp;gt;messages(Inflector::singularize($this-&amp;gt;controller-&amp;gt;name), $validationRules)?&amp;gt; 		&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;/code&gt;Now all your validation messages you define in the model will be defined for your client-side validation as well. Make sure your validation labels in the Model match the names used in the Validation plugin (ie: required, minlength, maxlength, email, etc).</description>
				<pubDate>Thu, 17 Jan 2008 10:56:57 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/MySQL+LIKE+query+using+column+contents</guid>
				<title>MySQL LIKE query using column contents</title>
				<link>http://www.miphp.net/blog/view/MySQL+LIKE+query+using+column+contents</link>
				<description>I recently needed to build a query that would filter results by comparing a value from one table against another. This is relatively simple if you're checking for equality, but if you need to use &lt;a href=&quot;http://www.mysql.com/&quot;&gt;MySQL&lt;/a&gt;'s &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html&quot;&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;LIKE&lt;/span&gt;&lt;/a&gt; to compare strings, then things get hairy. My attempt at:&lt;br /&gt;&lt;br /&gt;
&lt;code&gt;SELECT &lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows.*&lt;br /&gt;&lt;br /&gt;
FROM&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows, states&lt;br /&gt;&lt;br /&gt;
WHERE&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; states.id = shows.state_id AND&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows.location LIKE %states.abbreviation&lt;/code&gt; Failed miserably. After some thought I realized that, because MySQL is looking for a string constant when using &lt;span style=&quot;font-family: monospace;&quot;&gt;LIKE&lt;/span&gt;, I needed a way for the value of the column in question to be considered a constant but also prepend the wildcard '%' character in front of it. Here's the solution I came up with, and it works beautifully: &lt;code&gt; SELECT&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows.*&lt;br /&gt;&lt;br /&gt;
FROM&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows, states&lt;br /&gt;&lt;br /&gt;
WHERE&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; states.id = shows.state_id AND&lt;br /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shows.location LIKE concat('%', states.abbreviation) &lt;/code&gt; Without a string concatenation character built into the syntax of MySQL, the use of the &lt;a style=&quot;font-family: monospace;&quot; href=&quot;http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat&quot;&gt;concat()&lt;/a&gt; function is required. It takes an arbitrary number of parameters that will evaluate into a single string constant. I couldn't find much from Google on this particular use of &lt;span style=&quot;font-family: monospace;&quot;&gt;LIKE&lt;/span&gt;, so I hope someone finds this post useful.</description>
				<pubDate>Mon, 14 Jan 2008 09:29:22 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/Akismet+Class+Updated</guid>
				<title>Akismet Class Updated</title>
				<link>http://www.miphp.net/blog/view/Akismet+Class+Updated</link>
				<description>I've released a new version of the &lt;a href=&quot;http://www.miphp.net/blog/view/new_akismet_class&quot;&gt;PHP4 Akismet class&lt;/a&gt; to allow multiple comments to be checked for spam using only a single instantiated Akismet object. This should help cut down on memory usage for anyone looking to do batch spam checking. &lt;a href=&quot;http://www.miphp.net/blog/view/new_akismet_class&quot;&gt;Get it&lt;/a&gt; while it's hot!</description>
				<pubDate>Mon, 07 Jan 2008 21:12:34 GMT</pubDate>
			</item>
			
			<item>
				<guid>http://www.miphp.net/blog/view/Siding+Physics</guid>
				<title>Siding Physics</title>
				<link>http://www.miphp.net/blog/view/Siding+Physics</link>
				<description>Let's take a brief break from programming related entries to mention something a little funny that happened this morning near my house. I was sitting in the living room watching TV, enjoying a cup of coffee when I hear a bunch of scraping sounds and a couple crashes. I wasn't sure what caused the sounds so I got up to investigate to find something pretty comical just outside my house.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt; &lt;a href=&quot;http://www.flickr.com/photos/bkuhns/2138914628/&quot;&gt;&lt;img src=&quot;http://farm3.static.flickr.com/2114/2138914628_314cdef7ff_m.jpg&quot; alt=&quot;&quot; style=&quot;border: 2px solid rgb(17, 51, 102); padding: 2px;&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Apparently someone's never heard of momentum, and thus didn't bother to strap down a whole load of siding/paneling he set on the top of his truck. After all was put back on, he continued down the street but this time, very slowly &lt;img src=&quot;/js/editor/images/smiley/msn/tounge_smile.gif&quot; alt=&quot;&quot; /&gt;. Now that we've all had a good chuckle, let's get back to business.</description>
				<pubDate>Wed, 26 Dec 2007 11:08:29 GMT</pubDate>
			</item>
			</channel>
</rss>