<?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>Think Lamp &#187; MySQL</title>
	<atom:link href="http://www.think-lamp.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.think-lamp.com</link>
	<description>Everything Linux Apache Php Mysql</description>
	<lastBuildDate>Fri, 18 Feb 2011 01:28:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Multiple SQL Queries in a Stored Procedure.</title>
		<link>http://www.think-lamp.com/2008/12/multiple-sql-queries-in-a-stored-procedure/</link>
		<comments>http://www.think-lamp.com/2008/12/multiple-sql-queries-in-a-stored-procedure/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 21:21:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://www.think-lamp.com/?p=121</guid>
		<description><![CDATA[Working on a Thursday afternoon, I came across a problem where we had to return multiple counts (about 10 of them ) in an application. One way was to have multiple stored procedures and call them one by one, but this would mean I would have to make 10 connections to the database and 10 <a href='http://www.think-lamp.com/2008/12/multiple-sql-queries-in-a-stored-procedure/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div class="Q2bXSc">Working on a Thursday afternoon, I came across a problem where we had to <strong>return multiple counts</strong> (about 10 of them ) in an application. One way was to have multiple stored procedures and call them one by one, but this would mean I would have to make 10 connections to the database and 10 opens , 10 closes, phew !</div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3741710014597097";
/* 468x15, created 3/25/09 */
google_ad_slot = "1110499399";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="Q2bXSc">So I decided to combine all of them into one:</div>
<div class="Q2bXSc"><span id="more-121"></span></div>
<div class="RNCQof">
<div class="Q2bXSc"><strong><span id=":1rj"></p>
<pre class="brush: sql;">
SELECT &quot;totaltrees&quot; =(SELECT count(*)  FROM Forest f  WHERE f.trees= @forestId),
&quot;totalplants&quot; =(SELECT count(*)  FROM Forest f WHERE f.plants= @forestId),
&quot;totalUsers&quot;=(SELECT count(*)  FROM Users u WHERE u.groupId= @groupId)
</pre>
<p></span></strong></div>
</div>
<div class="Q2bXSc">Here you can add as many as queries you want and from different tables, counts, columns etc. Just one thing, The result of each query should have a unique value, thus you can&#8217;t do select *  !!</div>
<div class="Q2bXSc">Or something like: select country_name FROM world.</div>
<div class="Q2bXSc">cool ! isn&#8217;t it ?</div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.think-lamp.com%2F2008%2F12%2Fmultiple-sql-queries-in-a-stored-procedure%2F&amp;linkname=Multiple%20SQL%20Queries%20in%20a%20Stored%20Procedure."><img src="http://www.think-lamp.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.think-lamp.com/2008/12/multiple-sql-queries-in-a-stored-procedure/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Pagination in mysql CLI</title>
		<link>http://www.think-lamp.com/2008/10/pagination-in-mysql-cli/</link>
		<comments>http://www.think-lamp.com/2008/10/pagination-in-mysql-cli/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 19:01:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[more]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[scroll]]></category>

		<guid isPermaLink="false">http://www.think-lamp.com/?p=69</guid>
		<description><![CDATA[Ever wonder how to scroll upwards in mysl resultset ? What if your terminal doesn&#8217;t allow scrollback or the scrollback buffer is somehow set to sreen lines ? How to use MORE or LESS unix commands in mysql which would allow to scroll using &#8216;return&#8217; or &#8216;spacebar&#8217; Follow the steps given below: [Invoke mysql using <a href='http://www.think-lamp.com/2008/10/pagination-in-mysql-cli/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Ever wonder how to scroll upwards in mysl resultset ?</p>
<p>What if your terminal doesn&#8217;t allow scrollback or the scrollback buffer is somehow set to sreen lines ?</p>
<p>How to use MORE or LESS unix commands in mysql which would allow to scroll using &#8216;return&#8217; or &#8216;spacebar&#8217;</p>
<p><strong>Follow the steps given below: </strong></p>
<p>[<em>Invoke mysql using the --page command</em>]</p>
<ol>
<li>
<pre class="brush: bash;">mysql --page uuser -p  </pre>
</li>
<p>[<em>set the pager to use less</em>]</p>
<li>
<pre class="brush: bash;">mysql&amp;gt; pager less</pre>
</li>
<p>[<em>run your query</em>]</p>
<li>
<pre class="brush: bash;">mysql&amp;gt; select * from table_name</pre>
</li>
</ol>
<p>This also  works under the unix &#8216;screen&#8217; terminal emulation</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.think-lamp.com%2F2008%2F10%2Fpagination-in-mysql-cli%2F&amp;linkname=Pagination%20in%20mysql%20CLI"><img src="http://www.think-lamp.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.think-lamp.com/2008/10/pagination-in-mysql-cli/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello Lamp-World !</title>
		<link>http://www.think-lamp.com/2008/08/hello-world/</link>
		<comments>http://www.think-lamp.com/2008/08/hello-world/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 04:16:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[what is lamp]]></category>

		<guid isPermaLink="false">http://nishchayshah.com/think-lamp/?p=1</guid>
		<description><![CDATA[Welcome to the world of LAMP. For all you disgraceful people who don&#8217;t know what it is, the definition: L = &#62; Linux ( Its an operating system ) A =&#62; Apache ( Its a web server ) M =&#62; MySQL ( Its a database system ) P =&#62; PhP {&#38;perl } ( These are <a href='http://www.think-lamp.com/2008/08/hello-world/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h4><span style="color: #993300;">Welcome to the world of LAMP.</span></h4>
<h4><span style="color: #993300;">For all you disgraceful people who don&#8217;t know what it is, the definition:</span></h4>
<h4><span style="color: #993300;"><strong>L</strong> = &gt; <strong>Linux </strong>( Its an operating system )<br />
<strong>A</strong> =&gt; <strong>Apache </strong>( Its a web server )<br />
<strong>M</strong> =&gt; <strong>MySQL </strong>( Its a database system )<br />
<strong>P</strong> =&gt; <strong>PhP</strong> {&amp;<strong>perl</strong> } ( These are programming languages )</span></h4>
<h4><span style="color: #993300;"><strong>Wiki page:</strong> http://en.wikipedia.org/wiki/LAMP_(software_bundle)</span></h4>
<h4><span style="color: #993300;">We, here, at Lamp-World are group of people who live eat and think lamp.  This site is aimed to have a collection of amazing &#8216;scripts&#8217; , &#8216;tweaks&#8217; and &#8216;solutions&#8217; which you may not find anywhere else.</span></h4>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.think-lamp.com%2F2008%2F08%2Fhello-world%2F&amp;linkname=Hello%20Lamp-World%20%21"><img src="http://www.think-lamp.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.think-lamp.com/2008/08/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

