<?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>eli geske &#187; MySQL</title>
	<atom:link href="http://eligeske.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://eligeske.com</link>
	<description>Good information for the geeky kind.</description>
	<lastBuildDate>Tue, 15 May 2012 00:20: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>#2006 MySQL server has gone away</title>
		<link>http://eligeske.com/mysql/2006-mysql-server-has-gone-away/</link>
		<comments>http://eligeske.com/mysql/2006-mysql-server-has-gone-away/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 23:15:21 +0000</pubDate>
		<dc:creator>eligeske</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[#2006]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[PHPMYADMIN Error]]></category>

		<guid isPermaLink="false">http://eligeske.com/?p=378</guid>
		<description><![CDATA[Error message "#2006 MySQL server has gone away" coming from PHPMYADMIN.]]></description>
			<content:encoded><![CDATA[<p>Recently I was doing an import of a clients database from production which was so so in size. But I was installing it on a fresh install of WAMP Server. First it died because of upload_max_filesize inside the php.ini, that one is a simple one. After changing that to a size larger than the db import script PHPMYADMIN threw the #2006 MySQL server has gone away.</p>
<p>After scouring the web and the mysql site and found that if a packet is too large the mysql connection will be closed.</p>
<p>So to set the max size allowed for the packet in mysql change:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://eligeske.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;">max_allowed_packet <span class="sy0">=</span> 60M</pre></div></div>
<p>By default it was set to 1M and 60 seemed to be plenty to do the trick.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://eligeske.com/mysql/2006-mysql-server-has-gone-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL query for FirstName, LastName search</title>
		<link>http://eligeske.com/mysql/mysql-query-for-firstname-lastname-search/</link>
		<comments>http://eligeske.com/mysql/mysql-query-for-firstname-lastname-search/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 17:13:04 +0000</pubDate>
		<dc:creator>eligeske</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[combined query]]></category>
		<category><![CDATA[firstname lastname]]></category>
		<category><![CDATA[mysql search]]></category>
		<category><![CDATA[two field search]]></category>

		<guid isPermaLink="false">http://eligeske.com/?p=388</guid>
		<description><![CDATA[How to search a MySQL database combining two fields. The example shows how to search a full name when the name is split by firstname and lastname.]]></description>
			<content:encoded><![CDATA[<p>In most cases databases are set up to split a persons first name and last name. So when doing a search for people in a database you need to join the two fields together in the search statement.</p>
<p>Or you could split it into separate queries based on the space, but that would add more server load and function time, not good.</p>
<p>It&#8217;s much easier to use the MySQL concat() method, or concat_ws() which is concat with a seperator.</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://eligeske.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://eligeske.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="mysql" style="font-family:monospace;"><a href="http://search.mysql.com/search?site=refman-<span class="nu0">51</span><span class="sy1">&amp;</span>q<span class="sy1">=</span>SELECT<span class="sy1">&amp;</span>lr<span class="sy1">=</span>lang_en"><span class="kw1">SELECT</span></a> <span class="sy1">*</span> <a href="http://search.mysql.com/search?site=refman-<span class="nu0">51</span><span class="sy1">&amp;</span>q<span class="sy1">=</span>FROM<span class="sy1">&amp;</span>lr<span class="sy1">=</span>lang_en"><span class="kw1">FROM</span></a> <span class="st0">`table<span class="es1">_</span>name`</span> <a href="http://search.mysql.com/search?site=refman-<span class="nu0">51</span><span class="sy1">&amp;</span>q<span class="sy1">=</span>WHERE<span class="sy1">&amp;</span>lr<span class="sy1">=</span>lang_en"><span class="kw1">WHERE</span></a> <a href="http://dev.mysql.com/doc/refman/<span class="nu0">5</span>.1<span class="sy1">/</span>en<span class="sy1">/</span>string<span class="sy1">-</span>functions.html"><span class="kw13">concat_ws</span></a><span class="br0">&#40;</span><span class="st0">' '</span><span class="sy2">,</span> <span class="st0">'FirstName'</span><span class="sy2">,</span> <span class="st0">'LastName'</span><span class="br0">&#41;</span><span class="sy2">;</span></pre></div></div>
<p><strong>Please note that in the first quotes is a space.</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://eligeske.com/mysql/mysql-query-for-firstname-lastname-search/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

