<?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>Ryan Stemkoski &#187; MySQL</title>
	<atom:link href="http://www.stemkoski.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stemkoski.com</link>
	<description>Web design tips &#38; tricks plus anything else I want to talk about...</description>
	<lastBuildDate>Sat, 07 Jan 2012 18:34:18 +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>Start MySQL Auto-Increment at a Number Other Than 1</title>
		<link>http://www.stemkoski.com/start-mysql-auto-increment-at-a-number-other-than-1/</link>
		<comments>http://www.stemkoski.com/start-mysql-auto-increment-at-a-number-other-than-1/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 23:11:31 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=1418</guid>
		<description><![CDATA[By default, MySQL will start auto incrementing from 1 with each new entry. This means the first entry in a database is 1, the second is 2, and so on. Occasionally, it may be helpful to start this number at another value. It could be for sequential product numbers, better disguised customer ID numbers, or [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>By default, MySQL will start auto incrementing from 1 with each new entry.  This means the first entry in a database is 1, the second is 2, and so on.  Occasionally, it may be helpful to start this number at another value.  It could be for sequential product numbers, better disguised customer ID numbers, or any number of other programmatic reasons.  Many regular MySQL users don&#8217;t realize it but MySQL has a simple method of choosing the auto increment starting value for a given table.  You can adjust the number to whatever you would like by executing the following SQL:</p>

<div class="wp_syntax"><div class="code"><pre class="html5strict" style="font-family:monospace;">ALTER TABLE table AUTO_INCREMENT = 1000;</pre></div></div>

<p>(Where 1000 is the number you would like to start the auto incrementing at)</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/start-mysql-auto-increment-at-a-number-other-than-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Access MySQL at Web Hosts Without phpMyAdmin</title>
		<link>http://www.stemkoski.com/how-to-access-mysql-at-web-hosts-without-phpmyadmin/</link>
		<comments>http://www.stemkoski.com/how-to-access-mysql-at-web-hosts-without-phpmyadmin/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 14:21:01 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Adminer]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQLyog]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=1295</guid>
		<description><![CDATA[While most web hosts have phpMyAdmin installed for their customers to use, there are plenty out there that do not. The phpMyAdmin interface is what most developers have become accustomed to when developing MySQL based websites. If phpMyAdmin is not installed on your web host, there are several options that will allow you to access [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>While most web hosts have phpMyAdmin installed for their customers to use, there are plenty out there that do not. The phpMyAdmin interface is what most developers have become accustomed to when developing MySQL based websites.  If phpMyAdmin is not installed on your web host, there are several options that will allow you to access and modify MySQL.  Several of these options are listed below in no particular order. This list certainly doesn’t include every option but there are enough listed that there should be a solution for your specific situation.</p>
<h3>Option 1: Install phpMyAdmin</h3>
<p>phpMyAdmin is just a simple PHP based program. You can download a copy from the phpMyAdmin website. (<a href="http://www.phpmyadmin.net/home_page/downloads.php" target="_blank">http://www.phpmyadmin.net/home_page/downloads.php</a>) Then you can install it by following the simple instructions similar to how you would WordPress, Drupal, or any other PHP based application.  This is a good solution, although phpMyAdmin is a large interface and may take awhile to load and setup.</p>
<h3>Option 2: Use phpMyAdmin Alternative such as Adminer</h3>
<p>There are many alternatives to phpMyAdmin.  I think phpMyAdmin is a great piece of software and if it is enabled on the web host I will always use it.  If you run into a situation where it is not enabled then I suggest a phpMyAdmin alternative called Adminer.  This handy script offers many of the features of phpMyAdmin in a single file.  It is incredibly easy to install and the interface will already be familiar to anyone who works with phpMyAdmin on a regular basis.<br />
You can read more about Adminer here: <a href="http://www.adminer.org/en/" target="_blank">http://www.adminer.org/en/</a> or download this great script here: <a href="http://sourceforge.net/projects/adminer/files/Adminer/Adminer%202.1.0/adminer-2.1.0.php/download" target="_blank">http://sourceforge.net/projects/adminer/files/Adminer/Adminer%202.1.0/adminer-2.1.0.php/download</a>.</p>
<h3>Option 3: Use a MySQL Software such as SQLyog</h3>
<p>There are many software packages out there.  My favorite is a program called SQLyog. It works similar to Microsoft’s SQL Enterprise Manager.  This system allows you to manage your MySQL tables and structure from your remote computer.  To utilize this software your web hosting company needs to allow remote connections. This software offers all the features of phpMyAdmin and also has support for other database types such as PostgreSQL. You can download a copy at: <a href="http://www.webyog.com/en/downloads.php#sqlyog" target="_blank">http://www.webyog.com/en/downloads.php#sqlyog</a>.</p>
<h3>Option 4: Use Command Line or PHP to Manage through Queries</h3>
<p>The final option I am going to present is to manage your MySQL tables and structure by executing queries through PHP or using server’s command line if you have access.  This tends to be the most advanced option as many developers are not familiar with the query syntax to modify structure etc using SQL statements. I would suggest trying some of the other options before using this one.  My guess is if you didn’t already know the answer to this question this option may be more difficult for you than some of the others.</p>
<p>I hope these solutions help.  I remember the first time I came across this situation I had no idea what to do.  I was new to development and was accustomed to working with MySQL through phpMyAdmin and at the time didn’t even truly understand that phpMyAdmin wasn’t part of MySQL.  Up until that point I thought phpMyAdmin came bundled with MySQL and was the official GUI for MySQL because I had never had to use anything else.  </p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/how-to-access-mysql-at-web-hosts-without-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MySQL Dump of the 50 U.S. States</title>
		<link>http://www.stemkoski.com/mysql-dump-of-the-50-us-states/</link>
		<comments>http://www.stemkoski.com/mysql-dump-of-the-50-us-states/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 15:33:11 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zipline]]></category>
		<category><![CDATA[50 States]]></category>
		<category><![CDATA[MySQL Dump]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=1172</guid>
		<description><![CDATA[There have been many times I have needed a list of the 50 U.S. States for web applications. I have probably typed these in a dozen times or more over the years. It seems everytime I search for this list as a MySQL dump I am bombarded with data services trying to sell it for [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.stemkoski.com/wp-content/uploads/2009/08/us-states.gif" alt="us-states" title="us-states" width="250" height="190" style="float:right;" />There have been many times I have needed a list of the 50 U.S. States for web applications.  I have probably typed these in a dozen times or more over the years. It seems everytime I search for this list as a MySQL dump I am bombarded with data services trying to sell it for $3.99 or giving it away free with a monthly membership with their useless service. </p>
<p>To make life easier on both you and I have zipped up a MySQL dump of the 50 states and also the District of Columbia which isn’t technically a state. It is available free here for download without any viruses, spam, or special offers.</p>
<h2><a href="http://www.stemkoski.com/downloads/mysql_dump_of_50_US_states.zip">DOWNLOAD HERE</a></h2>
<p>Note: The District of Columbia is the last record in the database. If you don’t want to include it in your application you can easily find and delete it. </p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/mysql-dump-of-the-50-us-states/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The SEO Rapper&#8230; Again</title>
		<link>http://www.stemkoski.com/the-seo-rapper-agai/</link>
		<comments>http://www.stemkoski.com/the-seo-rapper-agai/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 21:57:57 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Rap]]></category>
		<category><![CDATA[Rapper]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Design Rap]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=1140</guid>
		<description><![CDATA[I am not a big YouTube person. Every once in awhile, I will watch something like Charlie the Unicorn or Lebron James high school highlight reels when I am super bored. Today I had a web developer friend send over a link to a video called Design Coding. Obviously, many of you beat me to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.stemkoski.com/wp-content/uploads/2009/04/seorapper.jpg" alt="seorapper" title="seorapper" width="250" height="250" style="float:right;" />I am not a big YouTube person.  Every once in awhile, I will watch something like Charlie the Unicorn or Lebron James high school highlight reels when I am super bored. Today I had a web developer friend send over a link to a video called Design Coding.  Obviously, many of you beat me to this video because as I am writing this it has nearly 445,000 views. </p>
<p>The video is from the Poetic Prophet (AKA The SEO Rapper) The rap is actually pretty funny. I have seen a couple other videos from the SEO Rapper but I hadn&#8217;t come across this one. Some of my favorite lines are:</p>
<p>“Don’t use italics use emphasis”</p>
<p>“Don’t duplicate it or you might face a litigation”</p>
<p>“Your photoshop functions, slice that design, do your layout with divs, make sure that its  aligned”</p>
<p>“Please don’t use tables even though they work fine, when it comes to indexing they give search engines a hard time”</p>
<p>“The competition will get bitter, you’ll shine like glitter”</p>
<p>It isn’t every day you hear a rap song about web design.  In fact I have only heard a couple and they were mostly done by white guys skinnier than I am.  In all honestly I can’t believe this exists but since it does you have to check it out.  If you&#8217;re really bored check out some of his other videos.  I know some of you may have seen them already but if you&#8217;re like me and missed out on the SEO Rapper thus far, you need to check him out.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/a0qMe7Z3EYg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/a0qMe7Z3EYg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/the-seo-rapper-agai/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>It Takes Lots of Water and Steroids to Grow a Web Developer</title>
		<link>http://www.stemkoski.com/it-takes-lots-of-water-and-steroid-to-grow-a-web-developer/</link>
		<comments>http://www.stemkoski.com/it-takes-lots-of-water-and-steroid-to-grow-a-web-developer/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 13:39:50 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Baseball]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Steriods]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=737</guid>
		<description><![CDATA[I had a conversation with a programmer friend yesterday morning that got me thinking about what it takes to be a successful programmer. Programming, whether it be for the web or software, is a unique and difficult business. The tough thing about being a programmer is that it is impossible to know everything you will [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.stemkoski.com/wp-content/uploads/2009/01/steriods.jpg" alt="steriods" title="steriods" width="250" height="195" style="float:right;" />I had a conversation with a programmer friend yesterday morning that got me thinking about what it takes to be a successful programmer.  Programming, whether it be for the web or software, is a unique and difficult business. The tough thing about being a programmer is that it is impossible to know everything you will encounter and the make-up of the industry and each language is constantly evolving.  To be a successful programmer you have to know and communicate with other programmers.  A strong personal network is to a programmer what steroids are to a baseball player. </p>
<p>I have been messing around with web development for 10 years.  In this time I have learned a lot about the web.  I have moved through HTML to XHTML, added CSS, learned to program and since have programmed in several languages.  In that same 10 years websites have changed immensely.  They have gone form simple online pages to complete applications.  They have gone from simple catalogs of information to interactive social communities. </p>
<p>One thing the web development industry has always offered is a strong online community.  If it wasn’t for the documentation other programmers offered, online forums, and help of other programmer friends there is no way I could have learned what I now know.  You can’t be an expert in everything, but thanks to a strong online web development community you can always find someone who knows more about a particular function or topic than you do.  The help and goodwill of strangers has helped me to complete many difficult projects. </p>
<p>If you’re just starting out in web development I strongly suggest you hop on the juice now.  Join some forums, subscribe to some blogs, share, and learn.  I started this blog as a way to give back. Cataloging what I learn in a single place in turn helps other programmers who come after me.  I encourage each of you to live open source and find ways to use and give back to the web development community. Without such a strong community our jobs would be much more difficult. Don’t fear, you can use web development steroids as much as you’d like without fear of testicular shrinkage.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/it-takes-lots-of-water-and-steroid-to-grow-a-web-developer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>LinkTogether &#8211; A Community for Web Designers</title>
		<link>http://www.stemkoski.com/linktogether-a-community-for-web-designers/</link>
		<comments>http://www.stemkoski.com/linktogether-a-community-for-web-designers/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 13:24:35 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[LinkTogether]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Design Business]]></category>
		<category><![CDATA[Web Design Community]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=570</guid>
		<description><![CDATA[First, I would like to welcome all my new subscribers. I have been getting an abnormally large amount of traffic the last few days and I have also seen a big increase in RSS subscriptions so if you’re new around here, welcome! Yesterday, I saw a press release from Network Solutions announcing a new web [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" target="_blank" href="http://www.linktogether.com  "><img src="http://www.stemkoski.com/wp-content/uploads/2009/01/linkedtogether.jpg" alt="linkedtogether" title="linkedtogether" width="246" height="96" class="alignright size-full wp-image-572" border="0" style="margin-left: 10px;" /></a><i>First, I would like to welcome all my new subscribers.  I have been getting an abnormally large amount of traffic the last few days and I have also seen a big increase in RSS subscriptions so if you’re new around here, welcome!</i></p>
<p>Yesterday, I saw a press release from Network Solutions announcing a new web developer community called LinkTogether.  I am of course leery of any community developed by a corporation, especially one that is so closely tied to their target audience.  That being said, I am a sucker for anything that is targeted at web developers and designers so I had to check it out.</p>
<p>After an hour of investigation I have to say I am intrigued.  The majority of LinkTogether is made up of already common tools like forums, tutorials, and a developer community.  What makes it different is it has some other fantastic resources for web developers like a list of pre-developed legal documents, white papers, and downloadable tools and applications.  In addition, they have LinkTogether Challenges where developers can win money for their applications.  I didn’t have much time to explore the challenges section but it seemed like an interesting concept.</p>
<p>Overall, I thought this was an interesting community that offers some great free tools for small web development firms. From a usability standpoint there are some changes I would make, particularly the way they force your password format. It will be interesting to see how this community develops, and what caliber of web professionals you will be able to find here.  At this stage, it is still a little weak from a content standpoint but I think it is worth monitoring for awhile to see how it grows.  If you sign-up and try it out leave me a comment to let me know what you think.</p>
<p>Check it out: <a rel="nofollow" target="_blank" href="http://www.linktogether.com  ">http://www.linktogether.com</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/linktogether-a-community-for-web-designers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>University of Northern Colorado Promotional Video</title>
		<link>http://www.stemkoski.com/university-of-northern-colorado-promotional-video/</link>
		<comments>http://www.stemkoski.com/university-of-northern-colorado-promotional-video/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 00:42:53 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[FindYourPlace]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Gonzaga]]></category>
		<category><![CDATA[Gonzaga Women's Basketball]]></category>
		<category><![CDATA[InspiredSeason]]></category>
		<category><![CDATA[University of Northern Colorado]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=499</guid>
		<description><![CDATA[This morning we released a fun and engaging Flash/video promotion for the University of Northern Colorado which I thought some of you may enjoy. Zipline completed the project in conjunction with MagnerSanborn advertising. The project builds on the earlier success of another MagnerSanborn/Zipline joint project, InspiredSeason.com. InspiredSeason.com is a viral video project which promotes Gonzaga [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This morning we released a fun and engaging Flash/video promotion for the University of Northern Colorado which I thought some of you may enjoy. Zipline completed the project in conjunction with MagnerSanborn advertising.  The project builds on the earlier success of another MagnerSanborn/Zipline joint project, InspiredSeason.com. InspiredSeason.com is a viral video project which promotes Gonzaga Women’s Basketball in a unique fashion.</p>
<p>The new project is a promotional video for the University of Northern Colorado which combines video, personalization, and interaction to provide a unique promotional experience for prospective students.  The video offers several types of personalization including, personalized audio, name personalization of posters, iPhone, and whiteboard.  This system, like the one we developed for the InspriedSeason.com project also makes an outgoing voice call to the phone number the users provides helping to engage them in the experience of the video.  </p>
<p>I apologize to my loyal fans. I have been busy trying to complete this project and a couple others before Christmas and I have slacked on posting the last few days.  Hopefully after Christmas I will be able to get back on my regular posting schedule.</p>
<p>In the meantime, check out the new project and let me know what you think: <a href="http://findyourplace.unco.edu" target="_blank">http://findyourplace.unco.edu</a>. Also, if you haven’t seen the <a href="http://www.inspiredseason.com" target="_blank">InspiredSeason.com</a> promotion for Gonzaga Women’s Basketball check that out too.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/university-of-northern-colorado-promotional-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create a Simple Podcast RSS Feed using PHP and MySQL</title>
		<link>http://www.stemkoski.com/how-to-create-a-simple-podcast-rss-feed-using-php-and-mysql/</link>
		<comments>http://www.stemkoski.com/how-to-create-a-simple-podcast-rss-feed-using-php-and-mysql/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 13:38:18 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[RSS Feed]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=364</guid>
		<description><![CDATA[Generating a podcast RSS feed with PHP is actually very easy. I have had to do it a few different times and every time I do it I have to look up the syntax of the XML document. To save myself time in the future I thought I would document the process here for myself [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Generating a podcast RSS feed with PHP is actually very easy. I have had to do it a few different times and every time I do it I have to look up the syntax of the XML document.  To save myself time in the future I thought I would document the process here for myself and others who may need to create a podcast RSS feed using PHP. (Note: This tutorial assumes that your server is running on apache and that you can use .htaccess files.)</p>
<p><strong>.htaccess Setup</strong><br />
The first step I always use when creating a podcast RSS feed with PHP is to set a value in my .htaccess file that indicates that files with the type .xml should be interpreted as PHP.  Your browser or RSS reader is going to be looking for pages with a .xml extension and creating a dynamic .xml file using PHP is easier than creating a number of static XML files for each feed or updating a .xml text file using a PHP script, at least in my opinion, although this is certainly possible if you don’t have the ability to use .htaccess or don’t know how. A simple example of an .htaccess entry is included below:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">AddType application/x-httpd-php .xml</pre></div></div>

<p>Also using .htaccess you can create a custom RSS feed by variable by using a statement similar to:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">RewriteEngine on
RewriteRule ^/?podcast/([0-9]+).xml?/?$ 	/podcast.php?id=$1</pre></div></div>

<p>Using this statement would mean that going to http://www.yoursite.com/podcast/23.xml would execute the script located at http://www.yoursite.com/podcast.php?id=23 passing the 23 from the address to your script so that you could create an RSS feed specifically for id 23 which could be a user id, a unique page, etc.</p>
<p><strong>The Code</strong><br />
The first function is a simple PHP header command which designates this page as an xml document.  This should be the first item on the page and no whitespace or output should take place prior to this in the script.</p>
<p>The PHP code example below is a simple example of a very basic RSS feed using PHP.  I have done this to avoid confusion that may occur with a more complicated example.   </p>
<p>The first section is what I call the RSS feed headers.  This section basically represents information about the feed.  This is generic information about the feed. </p>
<p>The second of section which I call the body of the RSS feed.  This section should be repeated for each item in the podcast RSS feed. (Note: Everything in between item and /item would be repeated for each item in the RSS feed.)  This can be done manually or it could be automated using PHP and a MySQL query or other type of loop to build a number of entries. For this example I showed this area as a static single entry to help avoid confusion.  </p>
<p>The final section closes out the channel and RSS feed and the final function sends the complete RSS feed to the browser.  </p>
<p>All in all this is a very basic example and I hope it works for everyone. I have tried to keep it as basic as possible.  Here is the complete PHP script.  Don’t forget to setup your .htaccess file or this won’t work as expected!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//SET XML HEADER</span>
    <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//CONSTRUCT RSS FEED HEADERS</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;rss version=&quot;2.0&quot;&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;channel&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;title&gt;Your RSS Feed Name or Website Name&lt;/title&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;description&gt;A description of your feed or site.&lt;/description&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;link&gt;http://www.yoursite.com/&lt;/link&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;copyright&gt;Your copyright details&lt;/copyright&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//BODY OF RSS FEED</span>
   <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;item&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;title&gt;Item Title&lt;/title&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;description&gt;Item Description&lt;/description&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;link&gt;Link to Item&lt;/link&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;enclosure url=&quot;http://www.yoursite.com/files/podcast.mp3&quot; length=&quot;6768&quot; type=&quot;audio/mpeg&quot;/&gt;'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//URL: FULL FILE PATH   LENGTH: IN BYTES</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;pubDate&gt;Date Published&lt;/pubDate&gt;'</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/item&gt; '</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//CLOSE RSS FEED</span>
   <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/channel&gt;'</span><span style="color: #339933;">;</span>
   <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/rss&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//SEND COMPLETE RSS FEED TO BROWSER</span>
    <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>If you&#8217;re looking to just create an RSS Feed all you have to do is remove the enclosure line!  Or click here for a <a href="http://www.stemkoski.com/how-to-create-a-simple-rss-feed-using-php-and-mysql/">tutorial on creating RSS feeds with PHP and MySQL</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/how-to-create-a-simple-podcast-rss-feed-using-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://www.yoursite.com/files/podcast.mp3" length="0" type="audio/mpeg" />
		</item>
		<item>
		<title>MooTools /  JavaScript Popup Calendar / Date Picker for HTML Forms</title>
		<link>http://www.stemkoski.com/mootools-javascript-pop-up-calendar-date-picker-for-html-forms/</link>
		<comments>http://www.stemkoski.com/mootools-javascript-pop-up-calendar-date-picker-for-html-forms/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 11:41:05 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Date Picker]]></category>
		<category><![CDATA[date()]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=332</guid>
		<description><![CDATA[MooTools 1.1: If you’re using MooTools 1.1 on a project here is a great MooTools based calendar / date picker popup for use in HTML forms. It is very easy to get running and also to customize. Both the style and position of the calendar can easily be modified. The author also has good instructions [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>MooTools 1.1:</strong><br />
If you’re using MooTools 1.1 on a project here is a great MooTools based calendar / date picker popup for use in HTML forms.  It is very easy to get running and also to customize.  Both the style and position of the calendar can easily be modified.  The author also has good instructions and a few examples available on the website.  </p>
<p>Check it out: http://www.electricprism.com/aeron/calendar/#download</p>
<p><strong>MooTools 1.2:</strong><br />
If you’re using MooTools 1.2 on a project here is a great MooTools based calendar / date picker popup for use with HTML forms.  This system is fairly easy to get running but requires PHP and uses MooTools Ajax to function.  If you are not using PHP it won’t be too useful. The author has some good examples and instructions on his website.</p>
<p>Check it out: http://dev.base86.com/scripts/vista-like_ajax_calendar_version_2.html.  </p>
<p><strong>If you are not using MooTools:</strong><br />
If you are not using MooTools here is a great JavaScript calendar popup example.  It is fairly easy to implement and seems to function well. It is a bit more difficult to customize than some of the alternative options but it still looks nice.   The author has a lot of examples on his website.</p>
<p>Check it out: http://www.mattkruse.com/javascript/calendarpopup/ </p>
<p>If you have some other good examples please post links in the comments.  I am anxious to see what else is out there I haven&#8217;t found yet.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/mootools-javascript-pop-up-calendar-date-picker-for-html-forms/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ranking MySQL Results by Multiple Columns</title>
		<link>http://www.stemkoski.com/ranking-mysql-results-by-multiple-columns/</link>
		<comments>http://www.stemkoski.com/ranking-mysql-results-by-multiple-columns/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 12:22:02 +0000</pubDate>
		<dc:creator>Ryan Stemkoski</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ORDER BY]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Query]]></category>

		<guid isPermaLink="false">http://www.stemkoski.com/?p=317</guid>
		<description><![CDATA[Today I got a request from a reader to make a post about how to rank MySQL results by multiple columns. This is actually really easy to do so it shouldn’t take long to explain. Basically when doing the query you can just add multiple items in the ORDER BY argument in your MySQL query. [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Today I got a request from a reader to make a post about how to rank MySQL results by multiple columns.  This is actually really easy to do so it shouldn’t take long to explain.   Basically when doing the query you can just add multiple items in the ORDER BY argument in your MySQL query.</p>
<p>For example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span>
    <span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM table ORDER BY column1,column2 DESC&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p> The DESC is optional. Basically what we’re doing is ranking the results by column1 then within each set from column1 these items are ranked by column2.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.stemkoski.com/ranking-mysql-results-by-multiple-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

