<?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 for dougv.com « Doug Vanderweide</title>
	<atom:link href="http://www.dougv.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dougv.com</link>
	<description>ASP.NET, PHP, XML, JavaScript, Web geekery, Entrepreneurship</description>
	<lastBuildDate>Fri, 18 May 2012 10:23:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach) by Doug Vanderweide</title>
		<link>https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/#comment-1037</link>
		<dc:creator>Doug Vanderweide</dc:creator>
		<pubDate>Fri, 18 May 2012 10:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=2222#comment-1037</guid>
		<description>@gaixixon: tablesorter has a pagination plugin, available at the same link. Its drawback is that it will only allow you to sort what is on the screen, not the entire recordset.

Thus, you should go the PHP route and use LIMIT. So, for example, if you have 50 records per page, and you want to show page 15, you would need to calculate, and add to both the header and a new, page navigation footer row, the page you want to use, like this:

[php]
define(&#039;MYSQL_PAGE_SIZE&#039;, 50);

$curpage = $_GET[&#039;p&#039;];

if(!isset($curpage) &#124;&#124; !preg_match(&#039;/[0-9]{1,3}/&#039;, $curpage])) {
	$curpage = 1;
}

$minrecord = ($curpage - 1) * MYSQL_PAGE_SIZE;
$maxrecord = $minrecord + MYSQL_PAGE_SIZE;

$sql .= &quot; LIMIT $minrecord, $maxrecord&quot;;
[/php]</description>
		<content:encoded><![CDATA[<p>@gaixixon: tablesorter has a pagination plugin, available at the same link. Its drawback is that it will only allow you to sort what is on the screen, not the entire recordset.</p>
<p>Thus, you should go the PHP route and use LIMIT. So, for example, if you have 50 records per page, and you want to show page 15, you would need to calculate, and add to both the header and a new, page navigation footer row, the page you want to use, like this:</p>
<pre class="brush: php; title: ; notranslate">
define('MYSQL_PAGE_SIZE', 50);

$curpage = $_GET['p'];

if(!isset($curpage) || !preg_match('/[0-9]{1,3}/', $curpage])) {
	$curpage = 1;
}

$minrecord = ($curpage - 1) * MYSQL_PAGE_SIZE;
$maxrecord = $minrecord + MYSQL_PAGE_SIZE;

$sql .= &quot; LIMIT $minrecord, $maxrecord&quot;;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach) by gaixixon</title>
		<link>https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/#comment-1036</link>
		<dc:creator>gaixixon</dc:creator>
		<pubDate>Fri, 18 May 2012 09:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=2222#comment-1036</guid>
		<description>I have some more questions: AFAIK, the php output *all* the pages, and the jquery hide some pages, and show only one by one. What happen if i have say 100pages? Each time user visit the site, php output all the 100pages, and jquery actually show each page but the server still have to output the same information!
I hope you get my point.</description>
		<content:encoded><![CDATA[<p>I have some more questions: AFAIK, the php output *all* the pages, and the jquery hide some pages, and show only one by one. What happen if i have say 100pages? Each time user visit the site, php output all the 100pages, and jquery actually show each page but the server still have to output the same information!<br />
I hope you get my point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach) by gaixixon</title>
		<link>https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/#comment-1035</link>
		<dc:creator>gaixixon</dc:creator>
		<pubDate>Fri, 18 May 2012 08:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=2222#comment-1035</guid>
		<description>Yay.. thank you Doug for the code. Especially the PHP one. I understand that it heavily hurts the server but this way make me understand the world easier than just two rows of jQuery :)
I have another question: is it possible to paginate the html output by jQuery? Currently I do this purely by PHP :)
gaixixon.</description>
		<content:encoded><![CDATA[<p>Yay.. thank you Doug for the code. Especially the PHP one. I understand that it heavily hurts the server but this way make me understand the world easier than just two rows of jQuery <img src='https://www.dougv.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I have another question: is it possible to paginate the html output by jQuery? Currently I do this purely by PHP <img src='https://www.dougv.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
gaixixon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach) by Doug Vanderweide</title>
		<link>https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/#comment-1032</link>
		<dc:creator>Doug Vanderweide</dc:creator>
		<pubDate>Tue, 15 May 2012 00:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=2222#comment-1032</guid>
		<description>@Blake: Sure. Just code in whatever you want.</description>
		<content:encoded><![CDATA[<p>@Blake: Sure. Just code in whatever you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sorting Your MySQL Results Set In PHP Using jQuery (And A More Traditional Approach) by Blake</title>
		<link>https://www.dougv.com/2009/06/13/sorting-your-mysql-results-set-in-php-using-jquery-and-a-more-traditional-approach/#comment-1031</link>
		<dc:creator>Blake</dc:creator>
		<pubDate>Mon, 14 May 2012 23:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=2222#comment-1031</guid>
		<description>Is there any way to put a row above the row that will have the links for sorting?  The  makes that row automatically be at the top but if I leave the  out then the sorting does not work.  Thanks!</description>
		<content:encoded><![CDATA[<p>Is there any way to put a row above the row that will have the links for sorting?  The  makes that row automatically be at the top but if I leave the  out then the sorting does not work.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixing An &quot;Unterminated String Literal&quot; Error In An AJAX JavaScript HttpRequest by Doug Vanderweide</title>
		<link>https://www.dougv.com/2008/06/10/fixing-an-unterminated-string-literal-error-in-an-ajax-javascript-httprequest/#comment-1022</link>
		<dc:creator>Doug Vanderweide</dc:creator>
		<pubDate>Wed, 09 May 2012 12:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=342#comment-1022</guid>
		<description>Without seeing the specific code, I can&#039;t help you, Darren. See the &quot;&lt;a href=&quot;https://www.dougv.com/need-more-help/&quot; rel=&quot;nofollow&quot;&gt;Need more help or want to say thanks&lt;/a&gt;&quot; link on the upper-right-hand corner for more information.</description>
		<content:encoded><![CDATA[<p>Without seeing the specific code, I can&#8217;t help you, Darren. See the &#8220;<a href="https://www.dougv.com/need-more-help/" rel="nofollow">Need more help or want to say thanks</a>&#8221; link on the upper-right-hand corner for more information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixing An &quot;Unterminated String Literal&quot; Error In An AJAX JavaScript HttpRequest by Darren</title>
		<link>https://www.dougv.com/2008/06/10/fixing-an-unterminated-string-literal-error-in-an-ajax-javascript-httprequest/#comment-1021</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Wed, 09 May 2012 12:33:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougv.com/blog/?p=342#comment-1021</guid>
		<description>Hi Doug,
Thanks for this article! I&#039;m getting the &#039;Unterminated string literal&#039; error message when trying to view the records of a particular client. I think I need to add the &#039;addslashes&#039; to &#039;site_name&#039; somehow but as I&#039;m a newbie to php I&#039;m not sure exactly how to do it. Could you take a look at the code and advise me please?

The error message is flagging up this piece of code:   $myarray=array();
--------------------------------------------


Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Doug,<br />
Thanks for this article! I&#8217;m getting the &#8216;Unterminated string literal&#8217; error message when trying to view the records of a particular client. I think I need to add the &#8216;addslashes&#8217; to &#8216;site_name&#8217; somehow but as I&#8217;m a newbie to php I&#8217;m not sure exactly how to do it. Could you take a look at the code and advise me please?</p>
<p>The error message is flagging up this piece of code:   $myarray=array();<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How To Increment A Counter In MySQL Based On A Radio Button Click by Doug Vanderweide</title>
		<link>https://www.dougv.com/2012/04/06/how-to-increment-a-counter-in-mysql-based-on-a-radio-button-click/#comment-943</link>
		<dc:creator>Doug Vanderweide</dc:creator>
		<pubDate>Fri, 20 Apr 2012 13:49:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.dougv.com/?p=4635#comment-943</guid>
		<description>Glad to hear it worked out and I was able to help!

For the record, I generally don&#039;t have an established amount to help with code implementation / troubleshooting. It&#039;s more of a sincerity test; I want the people I am helping to value my help, so I ask for a wish list purchase / cash donation to establish that fact.</description>
		<content:encoded><![CDATA[<p>Glad to hear it worked out and I was able to help!</p>
<p>For the record, I generally don&#8217;t have an established amount to help with code implementation / troubleshooting. It&#8217;s more of a sincerity test; I want the people I am helping to value my help, so I ask for a wish list purchase / cash donation to establish that fact.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How To Increment A Counter In MySQL Based On A Radio Button Click by Oliver Ruehl</title>
		<link>https://www.dougv.com/2012/04/06/how-to-increment-a-counter-in-mysql-based-on-a-radio-button-click/#comment-942</link>
		<dc:creator>Oliver Ruehl</dc:creator>
		<pubDate>Fri, 20 Apr 2012 13:18:33 +0000</pubDate>
		<guid isPermaLink="false">https://www.dougv.com/?p=4635#comment-942</guid>
		<description>Hi,

I&#039;ve found another solution which is simpler.
Thanks for your post anyway. It helped me to look in the right direction.

Have a nice weekend
Oliver</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve found another solution which is simpler.<br />
Thanks for your post anyway. It helped me to look in the right direction.</p>
<p>Have a nice weekend<br />
Oliver</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How To Increment A Counter In MySQL Based On A Radio Button Click by Oliver Ruehl</title>
		<link>https://www.dougv.com/2012/04/06/how-to-increment-a-counter-in-mysql-based-on-a-radio-button-click/#comment-940</link>
		<dc:creator>Oliver Ruehl</dc:creator>
		<pubDate>Fri, 20 Apr 2012 11:58:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.dougv.com/?p=4635#comment-940</guid>
		<description>Sure! I don&#039;t want you to do this for free.
How much would you charge to implement a solution that works for my site?

Skype: oruehl

It might be better to talk there :D
Oliver</description>
		<content:encoded><![CDATA[<p>Sure! I don&#8217;t want you to do this for free.<br />
How much would you charge to implement a solution that works for my site?</p>
<p>Skype: oruehl</p>
<p>It might be better to talk there <img src='https://www.dougv.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Oliver</p>
]]></content:encoded>
	</item>
</channel>
</rss>

