<?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>Jeremy Massel&#039;s Blog &#187; mySql</title>
	<atom:link href="http://masseltech.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://masseltech.com</link>
	<description>Because sometimes I have good ideas too</description>
	<lastBuildDate>Wed, 11 Aug 2010 17:16:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MySQL Duplicate Function</title>
		<link>http://masseltech.com/2010/07/mysql-duplicate-function/</link>
		<comments>http://masseltech.com/2010/07/mysql-duplicate-function/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 17:13:13 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mySql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[useful]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=208</guid>
		<description><![CDATA[Sometimes you want the ability to duplicate (clone) entities in mySQL. But duplicating their children can be a huge pain! Here&#8217;s how: /* parent table */ insert into [parent table] select 0, [field1, field2, field3] from [tablename] where [parent table primary key] = [parent table object ID] /* child table */ insert into [child table] [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want the ability to duplicate (clone) entities in mySQL. But duplicating their children can be a huge pain! Here&#8217;s how:</p>
<p><code></p>
<p>/* parent table */<br />
insert into [parent table]<br />
select 0, [field1, field2, field3] from [tablename] where [parent table primary key] = [parent table object ID]</p>
<p>/* child table */<br />
insert into [child table]<br />
select 0, [field1, field2, field3], (select max([parent table primary key]) from [parent table]) from [child table] where [parent table primary key] = [parent table object ID]</p>
<p></code></p>
<p><strong>important note! </strong> make sure that you don&#8217;t select the primary key of the table. instead, select 0, and the auto_increment function will automatically figure out the correct primary key</p>
<p>As always, if you have questions, post em in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/07/mysql-duplicate-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>mysql command doesn&#8217;t work in OS X snow leopard</title>
		<link>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/</link>
		<comments>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:09:01 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mySql]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=155</guid>
		<description><![CDATA[So you install mySql on your mac, and it&#8217;s working great, but then you go into terminal to run a mysqldump or something, and it doesn&#8217;t work! you get a message something like: -bash: mysqldump: command not found so how do you fix this? well, copy and paste the following into your terminal window and [...]]]></description>
			<content:encoded><![CDATA[<p>So you install mySql on your mac, and it&#8217;s working great, but then you go into terminal to run a mysqldump or something, and it doesn&#8217;t work!</p>
<p>you get a message something like:<br />
<code><br />
-bash: mysqldump: command not found<br />
</code></p>
<p>so how do you fix this? well, copy and paste the following into your terminal window and press enter:<br />
<code><br />
echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile</p>
<p>source ~/.profile<br />
</code></p>
<p>whoa, whoa, you say. what is this doing? It makes it so that when you type any command into the terminal, it does a check of these folders before giving you the &#8220;command not found&#8221; error. </p>
<p>If you want to undo it, you can always edit your .profile, or just delete it. </p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
