<?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: PHP-MySql: Select previous row and next row from current ID</title>
	<atom:link href="http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/</link>
	<description>Fight for what you belive in</description>
	<lastBuildDate>Thu, 02 Sep 2010 13:50:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: sivan</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-27979</link>
		<dc:creator>sivan</dc:creator>
		<pubDate>Sun, 18 Jul 2010 22:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-27979</guid>
		<description>How to sort by string instead of ID?</description>
		<content:encoded><![CDATA[<p>How to sort by string instead of ID?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-21496</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Mon, 10 May 2010 12:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-21496</guid>
		<description>just to say for some reason my SQL didn&#039;t come out right in the reply above..</description>
		<content:encoded><![CDATA[<p>just to say for some reason my SQL didn&#8217;t come out right in the reply above..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-21495</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Mon, 10 May 2010 12:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-21495</guid>
		<description>Hi

Very smart!

Like the others though, I&#039;m trying to verify if the next and previous results in the DB the easy way. I figured I could cheat doing this:

$Query = &quot;select * from `welcome_images` where `id`&#039;$_HTTP[image]&#039; order by `id` asc limit 3&quot;

($_HTTP = $_GET + $_POST)

Unfortunately.. it doesn&#039;t work!

I could use 3 queries and test all 3 of them but ..  thats the long hard undynamic way!</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Very smart!</p>
<p>Like the others though, I&#8217;m trying to verify if the next and previous results in the DB the easy way. I figured I could cheat doing this:</p>
<p>$Query = &#8220;select * from `welcome_images` where `id`&#8217;$_HTTP[image]&#8216; order by `id` asc limit 3&#8243;</p>
<p>($_HTTP = $_GET + $_POST)</p>
<p>Unfortunately.. it doesn&#8217;t work!</p>
<p>I could use 3 queries and test all 3 of them but ..  thats the long hard undynamic way!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lings</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-21433</link>
		<dc:creator>Lings</dc:creator>
		<pubDate>Sun, 09 May 2010 20:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-21433</guid>
		<description>Do the same but change the date to timestamp strtotime then compare sizes.</description>
		<content:encoded><![CDATA[<p>Do the same but change the date to timestamp strtotime then compare sizes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vandai</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-12001</link>
		<dc:creator>vandai</dc:creator>
		<pubDate>Tue, 30 Mar 2010 07:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-12001</guid>
		<description>your welcome..
hope this is usefull..</description>
		<content:encoded><![CDATA[<p>your welcome..<br />
hope this is usefull..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-11833</link>
		<dc:creator>Andreas</dc:creator>
		<pubDate>Mon, 29 Mar 2010 20:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-11833</guid>
		<description>Thanks a lot for writing this. I was looking for a good solution to getting prev/next rows and this is perfect!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for writing this. I was looking for a good solution to getting prev/next rows and this is perfect!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dr.emi</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-10207</link>
		<dc:creator>dr.emi</dc:creator>
		<pubDate>Fri, 19 Mar 2010 10:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-10207</guid>
		<description>thank you so much friend!
your SQL code, very usefull for me :)</description>
		<content:encoded><![CDATA[<p>thank you so much friend!<br />
your SQL code, very usefull for me <img src='http://www.akemapa.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vandai</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-5706</link>
		<dc:creator>vandai</dc:creator>
		<pubDate>Fri, 12 Feb 2010 07:23:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-5706</guid>
		<description>will result empty or null data.
see my previous comment.</description>
		<content:encoded><![CDATA[<p>will result empty or null data.<br />
see my previous comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: haris</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-5705</link>
		<dc:creator>haris</dc:creator>
		<pubDate>Fri, 12 Feb 2010 07:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-5705</guid>
		<description>How to fix if previous / next data is empty?</description>
		<content:encoded><![CDATA[<p>How to fix if previous / next data is empty?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3746</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3746</guid>
		<description>wellwell the editor cut half of my query... I&#039;m giving up</description>
		<content:encoded><![CDATA[<p>wellwell the editor cut half of my query&#8230; I&#8217;m giving up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3745</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3745</guid>
		<description>UNION example (including a subquery to get sorting for certain ID.

(SELECT sorting 
FROM table
WHERE sorting  (SELECT sorting FROM table WHERE itemid = ?) 
AND groupid = ?
ORDER BY sorting ASC
LIMIT 1)</description>
		<content:encoded><![CDATA[<p>UNION example (including a subquery to get sorting for certain ID.</p>
<p>(SELECT sorting<br />
FROM table<br />
WHERE sorting  (SELECT sorting FROM table WHERE itemid = ?)<br />
AND groupid = ?<br />
ORDER BY sorting ASC<br />
LIMIT 1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3743</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:03:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3743</guid>
		<description>But you could UNION ALL the two queries if you wished to retrieve both values in one query.</description>
		<content:encoded><![CDATA[<p>But you could UNION ALL the two queries if you wished to retrieve both values in one query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3742</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 09 Aug 2009 13:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3742</guid>
		<description>forget about it, of course not.</description>
		<content:encoded><![CDATA[<p>forget about it, of course not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3741</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 09 Aug 2009 12:26:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3741</guid>
		<description>Couldn&#039;t I get the previous and next items in one query by changing the limit to 3 and using the first and third row of the resultset?</description>
		<content:encoded><![CDATA[<p>Couldn&#8217;t I get the previous and next items in one query by changing the limit to 3 and using the first and third row of the resultset?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vnkitecom</title>
		<link>http://www.akemapa.com/2008/07/15/php-mysql-select-previous-row-and-next-row-from-current-id/comment-page-1/#comment-3410</link>
		<dc:creator>vnkitecom</dc:creator>
		<pubDate>Tue, 30 Jun 2009 23:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.akemapa.com/?p=134#comment-3410</guid>
		<description>Кайтсерфинг, школа кайтсерфинга, обучение кайтсерфингу,кайтинг, кайтинг обучение, кайт школа, кайт школа вьетнам.</description>
		<content:encoded><![CDATA[<p>Кайтсерфинг, школа кайтсерфинга, обучение кайтсерфингу,кайтинг, кайтинг обучение, кайт школа, кайт школа вьетнам.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
