<?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>websitedesignby.com &#187; SQL</title>
	<atom:link href="http://www.websitedesignby.com/category/programming/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.websitedesignby.com</link>
	<description>Web Site Design and Programming - Naples, Florida</description>
	<lastBuildDate>Mon, 06 Sep 2010 11:27:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress Website Development Work Flow: wp-config.php</title>
		<link>http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/</link>
		<comments>http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:59:00 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.websitedesignby.com/?p=642</guid>
		<description><![CDATA[When I am working on a website I have a local development version that I program and test locally. When an update is implemented, it is tested locally before it is copied to the live server. Wordpress sites are treated no differently. Here is how you can make the wp-config.php portable to work in your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.websitedesignby.com/wp-content/uploads/local_live_sign1.jpg" alt="" title="local_live_sign" width="300" height="257" class="alignnone size-full wp-image-667" align="right" style="padding:10px;" />When I am working on a website I have a local development version that I program and test locally. When an update is implemented, it is tested locally before it is copied to the live server. Wordpress sites are treated no differently. Here is how you can make the wp-config.php portable to work in your live and local environment. Simply replace the variables below with the actual information for your web site and you will be have a wp-config.php that can happily thrive in both environments. </p>
<p>I defined an additional constant &#8216;LIVE&#8217; that I can refer to elsewhere in my code to determine if I am on the live server or not.</p>
<p><strong>wp-config.php</strong></p>
<div class="code">
<?php<br />
<span class="highlight"><br />
if($_SERVER['HTTP_HOST']==&#8217;livedomain.com&#8217; || $_SERVER['HTTP_HOST']==&#8217;www.livedomain.com&#8217;){</p>
<div class="indent">
	define(&#8216;DB_NAME&#8217;, &#8216;db_name_live&#8217;);    // The name of the database<br />
	define(&#8216;DB_USER&#8217;, &#8216;mysql_username_live&#8217;);     // Your MySQL username<br />
	define(&#8216;DB_PASSWORD&#8217;, &#8216;mysql_password_live&#8217;); // &#8230;and password<br />
	define(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);    // db host<br />
	define(&#8216;DB_CHARSET&#8217;, &#8216;utf8&#8242;);<br />
	define(&#8216;DB_COLLATE&#8217;, &#8221;);<br />
	define(&#8216;AUTH_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;SECURE_AUTH_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;LOGGED_IN_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;LIVE&#8217;, true);
</div>
<p>}else{</p>
<div class="indent">
	define(&#8216;DB_NAME&#8217;, &#8216;name_of_db_local&#8217;);    // The name of the database<br />
	define(&#8216;DB_USER&#8217;, &#8216;mysql_username_local&#8217;);     // Your MySQL username<br />
	define(&#8216;DB_PASSWORD&#8217;, &#8216;mysql_password_local&#8217;); // &#8230;and password<br />
	define(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);    // db host<br />
	define(&#8216;DB_CHARSET&#8217;, &#8216;utf8&#8242;);<br />
	define(&#8216;DB_COLLATE&#8217;, &#8221;);<br />
	define(&#8216;AUTH_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;SECURE_AUTH_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;LOGGED_IN_KEY&#8217;, &#8216;put your unique phrase here&#8217;);<br />
	define(&#8216;LIVE&#8217;, false);
</div>
<p>}<br />
</span><br />
// You can have multiple installations in one database if you give each a unique prefix<br />
$table_prefix  = &#8216;wp_&#8217;;   // Only numbers, letters, and underscores please!</p>
<p>// Change this to localize WordPress.  A corresponding MO file for the<br />
// chosen language must be installed to wp-content/languages.<br />
// For example, install de.mo to wp-content/languages and set WPLANG to &#8216;de&#8217;<br />
// to enable German language support.<br />
define (&#8216;WPLANG&#8217;, &#8221;);</p>
<p>/* That&#8217;s all, stop editing! Happy blogging. */</p>
<p>if ( !defined(&#8216;ABSPATH&#8217;) )<br />
	define(&#8216;ABSPATH&#8217;, dirname(__FILE__) . &#8216;/&#8217;);<br />
require_once(ABSPATH . &#8216;wp-settings.php&#8217;);<br />
?></p>
</div>
<h3>MySQL Queries</h3>
<p>Another thing to be conscious of when moving between a live and local server environment with Wordpress are couple of records in the wp_options table of the database. The <em>siteurl</em> and <em>liveurl</em> records will be different in your local environment and live environment. If you copy your database from one to the other, just run the appropriate query below (with the <em>liveurl</em> and <em>localurl</em> variables changed to your actual data) depending on if you are copying from local to live or live to local.</p>
<h3>Live to Local Query</h3>
<p>Run query on local database.</p>
<div class="code">
UPDATE wp_options SET option_value=&#8217;http://localurl.com&#8217; WHERE option_name=&#8217;siteurl&#8217; ;</p>
<p>UPDATE wp_options SET option_value=&#8217;http://localurl.com&#8217; WHERE option_name=&#8217;home&#8217;
</p></div>
<h3>Local to Live Query</h3>
<p>Run query on live database.</p>
<div class="code">
UPDATE wp_options SET option_value=&#8217;<em>http://liveurl.com</em>&#8216; WHERE option_name=&#8217;siteurl&#8217; ;</p>
<p>UPDATE wp_options SET option_value=&#8217;http://liveurl.com&#8217; WHERE option_name=&#8217;home&#8217;
</p></div>
<p>If you have any questions or suggestions, your comments are welcome below.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Wordpress+Website+Development+Work+Flow%3A+wp-config.php+http://5xr5x.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.websitedesignby.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Wordpress+Website+Development+Work+Flow%3A+wp-config.php+http://5xr5x.th8.us" title="Post to Twitter">Tweet This Post</a></p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.websitedesignby.com%2Fprogramming%2Fwordpress-website-development-work-flow-wp-config-php%2F&amp;linkname=Wordpress%20Website%20Development%20Work%20Flow%3A%20wp-config.php"><img src="http://www.websitedesignby.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>php and MySQL DATE_FORMAT quick reference</title>
		<link>http://www.websitedesignby.com/programming/sql/php-date/</link>
		<comments>http://www.websitedesignby.com/programming/sql/php-date/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:58:28 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://websitedesignby.com/?p=70</guid>
		<description><![CDATA[I know it&#8217;s lazy, but it&#8217;s handy&#8230;
date(&#8220;Y-m-d H:i:s&#8221;);
function.date.php

table.condensed{
font-size:11px;
font-family: Courier, "Courier New", monospace;
}
table.condensed th{
border:1px solid;
font-weight:bold;
background-color:#cccccc;
padding:3px;
}
table.condensed td{
border:1px solid;
padding:3px;
background-color:#ffffff;
}


The following characters are recognized in the format parameter string


format character
Description
Example returned values




Day
&#8212;
&#8212;


d
Day of the month, 2 digits with leading zeros
01 to 31


D
A textual representation of a day, three letters
Mon through Sun


j
Day of the month without leading zeros
1 to 31


l [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s lazy, but it&#8217;s handy&#8230;</p>
<p>date(&#8220;Y-m-d H:i:s&#8221;);</p>
<p><a href="http://us2.php.net/manual/en/function.date.php" target="_blank">function.date.php</a></p>
<style type="text/css">
table.condensed{
font-size:11px;
font-family: Courier, "Courier New", monospace;
}
table.condensed th{
border:1px solid;
font-weight:bold;
background-color:#cccccc;
padding:3px;
}
table.condensed td{
border:1px solid;
padding:3px;
background-color:#ffffff;
}</p>
</style>
<table class="condensed">
<caption><b>The following characters are recognized in the <i>format</i> parameter string</b></caption>
<thead valign="middle">
<tr valign="middle">
<th><i>format</i> character</th>
<th>Description</th>
<th>Example returned values</th>
</tr>
</thead>
<tbody class="tbody" valign="middle">
<tr valign="middle">
<td align="center"><em class="emphasis">Day</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>d</i></td>
<td align="left">Day of the month, 2 digits with leading zeros</td>
<td align="left"><i>01</i> to <i>31</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>D</i></td>
<td align="left">A textual representation of a day, three letters</td>
<td align="left"><i>Mon</i> through <i>Sun</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>j</i></td>
<td align="left">Day of the month without leading zeros</td>
<td align="left"><i>1</i> to <i>31</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>l</i> (lowercase &#8216;L&#8217;)</td>
<td align="left">A full textual representation of the day of the week</td>
<td align="left"><i>Sunday</i> through <i>Saturday</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>N</i></td>
<td align="left">ISO-8601 numeric representation of the day of the week (added in<br />
           PHP 5.1.0)</td>
<td align="left"><i>1</i> (for Monday) through <i>7</i> (for Sunday)</td>
</tr>
<tr valign="middle">
<td align="left"><i>S</i></td>
<td align="left">English ordinal suffix for the day of the month, 2 characters</td>
<td align="left">
            <i>st</i>, <i>nd</i>, <i>rd</i> or<br />
            <i>th</i>.  Works well with <i>j</i></p>
</td>
</tr>
<tr valign="middle">
<td align="left"><i>w</i></td>
<td align="left">Numeric representation of the day of the week</td>
<td align="left"><i>0</i> (for Sunday) through <i>6</i> (for Saturday)</td>
</tr>
<tr valign="middle">
<td align="left"><i>z</i></td>
<td align="left">The day of the year (starting from 0)</td>
<td align="left"><i>0</i> through <i>365</i></td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Week</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>W</i></td>
<td align="left">ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0)</td>
<td align="left">Example: <i>42</i> (the 42nd week in the year)</td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Month</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>F</i></td>
<td align="left">A full textual representation of a month, such as January or March</td>
<td align="left"><i>January</i> through <i>December</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>m</i></td>
<td align="left">Numeric representation of a month, with leading zeros</td>
<td align="left"><i>01</i> through <i>12</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>M</i></td>
<td align="left">A short textual representation of a month, three letters</td>
<td align="left"><i>Jan</i> through <i>Dec</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>n</i></td>
<td align="left">Numeric representation of a month, without leading zeros</td>
<td align="left"><i>1</i> through <i>12</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>t</i></td>
<td align="left">Number of days in the given month</td>
<td align="left"><i>28</i> through <i>31</i></td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Year</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>L</i></td>
<td align="left">Whether it&#8217;s a leap year</td>
<td align="left"><i>1</i> if it is a leap year, <i>0</i> otherwise.</td>
</tr>
<tr valign="middle">
<td align="left"><i>o</i></td>
<td align="left">ISO-8601 year number. This has the same value as<br />
            <i>Y</i>, except that if the ISO week number<br />
            (<i>W</i>) belongs to the previous or next year, that year<br />
            is used instead. (added in PHP 5.1.0)</td>
<td align="left">Examples: <i>1999</i> or <i>2003</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>Y</i></td>
<td align="left">A full numeric representation of a year, 4 digits</td>
<td align="left">Examples: <i>1999</i> or <i>2003</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>y</i></td>
<td align="left">A two digit representation of a year</td>
<td align="left">Examples: <i>99</i> or <i>03</i></td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Time</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>a</i></td>
<td align="left">Lowercase Ante meridiem and Post meridiem</td>
<td align="left"><i>am</i> or <i>pm</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>A</i></td>
<td align="left">Uppercase Ante meridiem and Post meridiem</td>
<td align="left"><i>AM</i> or <i>PM</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>B</i></td>
<td align="left">Swatch Internet time</td>
<td align="left"><i>000</i> through <i>999</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>g</i></td>
<td align="left">12-hour format of an hour without leading zeros</td>
<td align="left"><i>1</i> through <i>12</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>G</i></td>
<td align="left">24-hour format of an hour without leading zeros</td>
<td align="left"><i>0</i> through <i>23</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>h</i></td>
<td align="left">12-hour format of an hour with leading zeros</td>
<td align="left"><i>01</i> through <i>12</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>H</i></td>
<td align="left">24-hour format of an hour with leading zeros</td>
<td align="left"><i>00</i> through <i>23</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>i</i></td>
<td align="left">Minutes with leading zeros</td>
<td align="left"><i>00</i> to <i>59</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>s</i></td>
<td align="left">Seconds, with leading zeros</td>
<td align="left"><i>00</i> through <i>59</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>u</i></td>
<td align="left">Microseconds (added in PHP 5.2.2)</td>
<td align="left">Example: <i>54321</i></td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Timezone</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>e</i></td>
<td align="left">Timezone identifier (added in PHP 5.1.0)</td>
<td align="left">Examples: <i>UTC</i>, <i>GMT</i>, <i>Atlantic/Azores</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>I</i> (capital i)</td>
<td align="left">Whether or not the date is in daylight saving time</td>
<td align="left"><i>1</i> if Daylight Saving Time, <i>0</i> otherwise.</td>
</tr>
<tr valign="middle">
<td align="left"><i>O</i></td>
<td align="left">Difference to Greenwich time (GMT) in hours</td>
<td align="left">Example: <i>+0200</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>P</i></td>
<td align="left">Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3)</td>
<td align="left">Example: <i>+02:00</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>T</i></td>
<td align="left">Timezone abbreviation</td>
<td align="left">Examples: <i>EST</i>, <i>MDT</i> &#8230;</td>
</tr>
<tr valign="middle">
<td align="left"><i>Z</i></td>
<td align="left">Timezone offset in seconds. The offset for timezones west of UTC is always<br />
           negative, and for those east of UTC is always positive.</td>
<td align="left"><i>-43200</i> through <i>50400</i></td>
</tr>
<tr valign="middle">
<td align="center"><em class="emphasis">Full Date/Time</em></td>
<td align="left">&#8212;</td>
<td align="left">&#8212;</td>
</tr>
<tr valign="middle">
<td align="left"><i>c</i></td>
<td align="left">ISO 8601 date (added in PHP 5)</td>
<td align="left">2004-02-12T15:19:21+00:00</td>
</tr>
<tr valign="middle">
<td align="left"><i>r</i></td>
<td align="left"><a href="http://www.faqs.org/rfcs/rfc2822" class="link external">» RFC 2822</a> formatted date</td>
<td align="left">Example: <i>Thu, 21 Dec 2000 16:01:07 +0200</i></td>
</tr>
<tr valign="middle">
<td align="left"><i>U</i></td>
<td align="left">Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)</td>
<td align="left">See also <a href="function.time.php" class="function">time()</a></td>
</tr>
</tbody>
</table>
<p>MySQL DATE_FORMAT</p>
<table>
<tbody>
<tr>
<td><span class="bold"><strong>Specifier</strong></span></td>
<td><span class="bold"><strong>Description</strong></span></td>
</tr>
<tr>
<td><code class="literal">%a</code></td>
<td>Abbreviated weekday name<br />
                  (<code class="literal">Sun</code>..<code class="literal">Sat</code>)</td>
</tr>
<tr>
<td><code class="literal">%b</code></td>
<td>Abbreviated month name (<code class="literal">Jan</code>..<code class="literal">Dec</code>)</td>
</tr>
<tr>
<td><code class="literal">%c</code></td>
<td>Month, numeric (<code class="literal">0</code>..<code class="literal">12</code>)</td>
</tr>
<tr>
<td><code class="literal">%D</code></td>
<td>Day of the month with English suffix (<code class="literal">0th</code>,<br />
                  <code class="literal">1st</code>, <code class="literal">2nd</code>,<br />
                  <code class="literal">3rd</code>, …)</td>
</tr>
<tr>
<td><code class="literal">%d</code></td>
<td>Day of the month, numeric (<code class="literal">00</code>..<code class="literal">31</code>)</td>
</tr>
<tr>
<td><code class="literal">%e</code></td>
<td>Day of the month, numeric (<code class="literal">0</code>..<code class="literal">31</code>)</td>
</tr>
<tr>
<td><code class="literal">%f</code></td>
<td>Microseconds (<code class="literal">000000</code>..<code class="literal">999999</code>)</td>
</tr>
<tr>
<td><code class="literal">%H</code></td>
<td>Hour (<code class="literal">00</code>..<code class="literal">23</code>)</td>
</tr>
<tr>
<td><code class="literal">%h</code></td>
<td>Hour (<code class="literal">01</code>..<code class="literal">12</code>)</td>
</tr>
<tr>
<td><code class="literal">%I</code></td>
<td>Hour (<code class="literal">01</code>..<code class="literal">12</code>)</td>
</tr>
<tr>
<td><code class="literal">%i</code></td>
<td>Minutes, numeric (<code class="literal">00</code>..<code class="literal">59</code>)</td>
</tr>
<tr>
<td><code class="literal">%j</code></td>
<td>Day of year (<code class="literal">001</code>..<code class="literal">366</code>)</td>
</tr>
<tr>
<td><code class="literal">%k</code></td>
<td>Hour (<code class="literal">0</code>..<code class="literal">23</code>)</td>
</tr>
<tr>
<td><code class="literal">%l</code></td>
<td>Hour (<code class="literal">1</code>..<code class="literal">12</code>)</td>
</tr>
<tr>
<td><code class="literal">%M</code></td>
<td>Month name (<code class="literal">January</code>..<code class="literal">December</code>)</td>
</tr>
<tr>
<td><code class="literal">%m</code></td>
<td>Month, numeric (<code class="literal">00</code>..<code class="literal">12</code>)</td>
</tr>
<tr>
<td><code class="literal">%p</code></td>
<td>
<code class="literal">AM</code> or <code class="literal">PM</code>
</td>
</tr>
<tr>
<td><code class="literal">%r</code></td>
<td>Time, 12-hour (<code class="literal">hh:mm:ss</code> followed by<br />
                  <code class="literal">AM</code> or <code class="literal">PM</code>)</td>
</tr>
<tr>
<td><code class="literal">%S</code></td>
<td>Seconds (<code class="literal">00</code>..<code class="literal">59</code>)</td>
</tr>
<tr>
<td><code class="literal">%s</code></td>
<td>Seconds (<code class="literal">00</code>..<code class="literal">59</code>)</td>
</tr>
<tr>
<td><code class="literal">%T</code></td>
<td>Time, 24-hour (<code class="literal">hh:mm:ss</code>)</td>
</tr>
<tr>
<td><code class="literal">%U</code></td>
<td>Week (<code class="literal">00</code>..<code class="literal">53</code>), where Sunday is the<br />
                  first day of the week</td>
</tr>
<tr>
<td><code class="literal">%u</code></td>
<td>Week (<code class="literal">00</code>..<code class="literal">53</code>), where Monday is the<br />
                  first day of the week</td>
</tr>
<tr>
<td><code class="literal">%V</code></td>
<td>Week (<code class="literal">01</code>..<code class="literal">53</code>), where Sunday is the<br />
                  first day of the week; used with <code class="literal">%X</code></p>
</td>
</tr>
<tr>
<td><code class="literal">%v</code></td>
<td>Week (<code class="literal">01</code>..<code class="literal">53</code>), where Monday is the<br />
                  first day of the week; used with <code class="literal">%x</code>
</td>
</tr>
<tr>
<td><code class="literal">%W</code></td>
<td>Weekday name (<code class="literal">Sunday</code>..<code class="literal">Saturday</code>)</td>
</tr>
<tr>
<td><code class="literal">%w</code></td>
<td>Day of the week<br />
                  (<code class="literal">0</code>=Sunday..<code class="literal">6</code>=Saturday)</td>
</tr>
<tr>
<td><code class="literal">%X</code></td>
<td>Year for the week where Sunday is the first day of the week, numeric,<br />
                  four digits; used with <code class="literal">%V</code>
</td>
</tr>
<tr>
<td><code class="literal">%x</code></td>
<td>Year for the week, where Monday is the first day of the week, numeric,<br />
                  four digits; used with <code class="literal">%v</code>
</td>
</tr>
<tr>
<td><code class="literal">%Y</code></td>
<td>Year, numeric, four digits</td>
</tr>
<tr>
<td><code class="literal">%y</code></td>
<td>Year, numeric (two digits)</td>
</tr>
<tr>
<td><code class="literal">%%</code></td>
<td>A literal “<span class="quote"><code class="literal">%</code></span>” character</td>
</tr>
<tr>
<td><code class="literal">%<em class="replaceable"><code>x</code></em></code></td>
<td>
<em class="replaceable"><code>x</code></em>, for any<br />
                  “<span class="quote"><em class="replaceable"><code>x</code></em></span>” not listed<br />
                  above</td>
</tr>
</tbody>
</table>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=php+and+MySQL+DATE_FORMAT+quick+reference+http://ieq5z.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.websitedesignby.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=php+and+MySQL+DATE_FORMAT+quick+reference+http://ieq5z.th8.us" title="Post to Twitter">Tweet This Post</a></p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.websitedesignby.com%2Fprogramming%2Fsql%2Fphp-date%2F&amp;linkname=php%20and%20MySQL%20DATE_FORMAT%20quick%20reference"><img src="http://www.websitedesignby.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.websitedesignby.com/programming/sql/php-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpFlickr</title>
		<link>http://www.websitedesignby.com/apis/phpflickr/</link>
		<comments>http://www.websitedesignby.com/apis/phpflickr/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 01:32:58 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://websitedesignby.com/blog/?p=13</guid>
		<description><![CDATA[I made a random flickr image loader using phpFlickr.
It loads a random image from based on the search term entered in the text box. Search terms are saved in a database and reused randomly on each refresh.
 Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>I made a <a href="/flickr_random_image.php" target="_blank">random flickr image loader</a> using <a href="http://phpflickr.com/">phpFlickr.</a></p>
<p>It loads a random image from based on the search term entered in the text box. Search terms are saved in a database and reused randomly on each refresh.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=phpFlickr+http://epz58.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.websitedesignby.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=phpFlickr+http://epz58.th8.us" title="Post to Twitter">Tweet This Post</a></p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.websitedesignby.com%2Fapis%2Fphpflickr%2F&amp;linkname=phpFlickr"><img src="http://www.websitedesignby.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.websitedesignby.com/apis/phpflickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
