<?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>mochahochabeachside.com &#187; work</title>
	<atom:link href="http://mochahochabeachside.com/topics/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://mochahochabeachside.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 May 2011 04:31:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SQL Headache?</title>
		<link>http://mochahochabeachside.com/2010/03/sql-headache/</link>
		<comments>http://mochahochabeachside.com/2010/03/sql-headache/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 10:22:18 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://mochahochabeachside.com/?p=110</guid>
		<description><![CDATA[I thought I had a headache, today, and then I came across an SQL problem. Actually, it was just a crashed table, but the SQL in the error message made my head spin... SELECT IF(votenum &#62;= 1, votenum, 0) AS votenum, IF(votenum &#62;= 1 AND votenum &#62; 0, votetotal / votenum, 0) AS voteavg, post.pagetext [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I had a headache, today, and then I came across an SQL problem.  Actually, it was just a crashed table, but the SQL in the error message made my head spin...<br />
<code>SELECT IF(votenum &gt;= 1, votenum, 0) AS votenum, IF(votenum &gt;= 1 AND votenum &gt; 0, votetotal / votenum, 0) AS voteavg, post.pagetext AS preview, thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, postusername, postuserid, thread.iconid AS threadiconid, thread.dateline, notes, thread.visible, sticky, votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastpostid, thread.replycount, IF(thread.views&lt;=thread.replycount, thread.replycount+1, thread.views) AS views, thread.prefixid, thread.taglist, hiddencount, deletedcount , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed , deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason, threadredirect.expires, post.pagetext AS previewbbcode FROM thread AS thread LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread') LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1682 AND canview = 1) LEFT JOIN post AS post ON(post.postid = thread.firstpostid) LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid) WHERE thread.threadid IN (0,25887,23738,25882,25869,25881,25843,25792,25533,24533,25874,25879,25884,25870,25866,25873,25832,25846,22121,15123,25859) ORDER BY sticky DESC, lastpost DESC;</code></p>
<p>....After that? I need a drink...<br />
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://crazzycool.blogspot.com/2010/03/how-to-copy-or-move-ms-sql-database.html">How to Copy or Move MS SQL Database</a> (crazzycool.blogspot.com)</li>
<li class="zemanta-article-ul-li"><a href="http://domainmacher.com/sql-10-tips-for-working-smarter/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sql-10-tips-for-working-smarter">SQL 10+ tips for working smarter</a> (domainmacher.com)</li>
<li class="zemanta-article-ul-li"><a href="http://scvinodkumar.wordpress.com/2010/03/04/conditional-joins-in-mysql/">Conditional Joins in MySQL</a> (scvinodkumar.wordpress.com)</li>
</ul>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=5419277f-01cd-481b-8815-22ead4328e1e"><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://mochahochabeachside.com/2010/03/sql-headache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

