<?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>westworld: a webmasters best friend &#187; mysql_insert_id</title>
	<atom:link href="http://www.westworld.be/tag/mysql_insert_id/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.westworld.be</link>
	<description>A webmasters best friend</description>
	<lastBuildDate>Mon, 14 Jun 2010 18:12:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding leading zero&#8217;s and id&#8217;s with php</title>
		<link>http://www.westworld.be/a-note-to-self/adding-leading-zeros-and-ids-with-php/</link>
		<comments>http://www.westworld.be/a-note-to-self/adding-leading-zeros-and-ids-with-php/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 09:20:45 +0000</pubDate>
		<dc:creator>westworld</dc:creator>
				<category><![CDATA[a note to self]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql_insert_id]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sprintf]]></category>

		<guid isPermaLink="false">http://www.westworld.be/?p=18</guid>
		<description><![CDATA[How to: 
-add leading zero's to a string
-get the id of the last inserted line from MySQL


No related posts.]]></description>
			<content:encoded><![CDATA[<p>For a project of mine I had to make a dynamic filename<br />
We decided that the name should always be seven digits long and the file would be correspondent  to the line number in the database. For example line seven would link to a file 0000007.txt.</p>
<p><strong>code for the id from MySQL</strong><br />
$mynr = mysql_insert_id();</p>
<p><strong>code for the seven digits</strong><br />
$mynr = sprintf(&#8221;%07d&#8221;,$mynr);</p>
<h4>Related Blogs</h4>
<ul class="pc_pingback">
<li class="hdl" style="list-style: none">Related Blogs on <strong></strong></li>
</ul>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.westworld.be/a-note-to-self/adding-leading-zeros-and-ids-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
