<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Displaying row number (rownum) in MySQL</title>
	<atom:link href="http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/</link>
	<description>My name is Jimmy, and this is my story... ;)</description>
	<lastBuildDate>Sat, 19 May 2012 00:40:36 +0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Srinivasan KP</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-761</link>
		<dc:creator>Srinivasan KP</dc:creator>
		<pubDate>Sat, 19 May 2012 00:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-761</guid>
		<description>Hi,
Thanks for this piece of code. it works just fine.
However, my other requirement is to rank within a group.
For example, I have data as follows

 Model  Color Sales
 Mazda  Black  15
 Mazda  Red    25
 Mazda  White  35
 Honda  Black  22
 Honda  Red    18
 Honda  White  43

How Can I rank within the Model? So for Mazda i need to show 1,2and 3 and same for Honda as well</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for this piece of code. it works just fine.<br />
However, my other requirement is to rank within a group.<br />
For example, I have data as follows</p>
<p> Model  Color Sales<br />
 Mazda  Black  15<br />
 Mazda  Red    25<br />
 Mazda  White  35<br />
 Honda  Black  22<br />
 Honda  Red    18<br />
 Honda  White  43</p>
<p>How Can I rank within the Model? So for Mazda i need to show 1,2and 3 and same for Honda as well</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-756</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 07 May 2012 20:56:33 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-756</guid>
		<description>Why can I not select a single record with:

(SELECT @row_number:=0); SELECT row_number FROM (SELECT userid,@row_number:=@row_number+1 AS row_number FROM users ORDER BY `characters` asc) sub1 WHERE userid = 1

What am I doing wrong?</description>
		<content:encoded><![CDATA[<p>Why can I not select a single record with:</p>
<p>(SELECT @row_number:=0); SELECT row_number FROM (SELECT userid,@row_number:=@row_number+1 AS row_number FROM users ORDER BY `characters` asc) sub1 WHERE userid = 1</p>
<p>What am I doing wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ardha Gp</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-752</link>
		<dc:creator>Ardha Gp</dc:creator>
		<pubDate>Thu, 26 Apr 2012 15:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-752</guid>
		<description>It works, thanks...</description>
		<content:encoded><![CDATA[<p>It works, thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naim</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-748</link>
		<dc:creator>Naim</dc:creator>
		<pubDate>Thu, 19 Apr 2012 00:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-748</guid>
		<description>@CV: I am not sure what you meant by stored procedure, but if you were talking about inner queries (sub-queries), then it does work, as it is my case.
I have 2 sub-queries  and both are using order by. I have just put a 3rd query on top of them with @rownum and it worked. Cheers.</description>
		<content:encoded><![CDATA[<p>@CV: I am not sure what you meant by stored procedure, but if you were talking about inner queries (sub-queries), then it does work, as it is my case.<br />
I have 2 sub-queries  and both are using order by. I have just put a 3rd query on top of them with @rownum and it worked. Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CV</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-710</link>
		<dc:creator>CV</dc:creator>
		<pubDate>Sat, 25 Feb 2012 21:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-710</guid>
		<description>Thank you, it saved me a lot of time. But you can mention that when you use stored procedure with order by, it doesn´t work properly.</description>
		<content:encoded><![CDATA[<p>Thank you, it saved me a lot of time. But you can mention that when you use stored procedure with order by, it doesn´t work properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Membuat No di Hasil Query Mysql &#171; Pengingat</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-709</link>
		<dc:creator>Membuat No di Hasil Query Mysql &#171; Pengingat</dc:creator>
		<pubDate>Thu, 23 Feb 2012 17:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-709</guid>
		<description>[...] link dari situs ini dan ini cara membuat no pada hasil query [...]</description>
		<content:encoded><![CDATA[<p>[...] link dari situs ini dan ini cara membuat no pada hasil query [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashok sharma</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-2/#comment-698</link>
		<dc:creator>Ashok sharma</dc:creator>
		<pubDate>Wed, 11 Jan 2012 13:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-698</guid>
		<description>I want to display a table of various datas including a column of s.no. which should be continuous even if removed any data from the table.
Can you please tell me or this code will work for that?</description>
		<content:encoded><![CDATA[<p>I want to display a table of various datas including a column of s.no. which should be continuous even if removed any data from the table.<br />
Can you please tell me or this code will work for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Code Example</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-1/#comment-695</link>
		<dc:creator>Code Example</dc:creator>
		<pubDate>Sat, 24 Dec 2011 08:47:29 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-695</guid>
		<description>Smart solution!! Thanks Jim.

When I delete a row from a table then auto increment just missed the identity numbers. but this example save lots of time.

Your reply with the Tom&#039;s message also very helpful.

go ahead..</description>
		<content:encoded><![CDATA[<p>Smart solution!! Thanks Jim.</p>
<p>When I delete a row from a table then auto increment just missed the identity numbers. but this example save lots of time.</p>
<p>Your reply with the Tom&#8217;s message also very helpful.</p>
<p>go ahead..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed F</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-1/#comment-694</link>
		<dc:creator>Ed F</dc:creator>
		<pubDate>Sat, 24 Dec 2011 02:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-694</guid>
		<description>@Jimmy - I was excited to find this solution while trying to convert a MSSQL query using row_number() to MYSQL. Your solution did not work at first because my query uses INNER JOINS, but your response to Jim Zak on Mar 2,&#039;10 supplied the answer. I have no idea why it works, but it does. Guess it&#039;s time to do some research.

THANKS - You have been a BIG help!

Ed</description>
		<content:encoded><![CDATA[<p>@Jimmy &#8211; I was excited to find this solution while trying to convert a MSSQL query using row_number() to MYSQL. Your solution did not work at first because my query uses INNER JOINS, but your response to Jim Zak on Mar 2,&#8217;10 supplied the answer. I have no idea why it works, but it does. Guess it&#8217;s time to do some research.</p>
<p>THANKS &#8211; You have been a BIG help!</p>
<p>Ed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jimmy</title>
		<link>http://jimmod.com/blog/2008/09/displaying-row-number-rownum-in-mysql/comment-page-1/#comment-634</link>
		<dc:creator>jimmy</dc:creator>
		<pubDate>Fri, 14 Oct 2011 17:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/#comment-634</guid>
		<description>@Annete: do you mean crystal report?
I&#039;m not really familiar with crystal report, if you can explain the error message in more detail maybe I can give you a hint</description>
		<content:encoded><![CDATA[<p>@Annete: do you mean crystal report?<br />
I&#8217;m not really familiar with crystal report, if you can explain the error message in more detail maybe I can give you a hint</p>
]]></content:encoded>
	</item>
</channel>
</rss>

