<?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: Simple Pagination</title> <atom:link href="http://www.elanman.co.uk/2009/05/simple-pagination/feed/" rel="self" type="application/rss+xml" /><link>http://www.elanman.co.uk/2009/05/simple-pagination/</link> <description>ElanMan&#039;s Code Snippets</description> <lastBuildDate>Wed, 18 Jan 2012 12:55:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Tweeks</title><link>http://www.elanman.co.uk/2009/05/simple-pagination/comment-page-1/#comment-349</link> <dc:creator>Tweeks</dc:creator> <pubDate>Tue, 11 Oct 2011 14:08:48 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=829#comment-349</guid> <description>I&#039;m sorry.. Although I wrote the code in codetags, it still removed the li and p tags in the second part of code. Hope it&#039;s still clear.</description> <content:encoded><![CDATA[<p>I&#8217;m sorry.. Although I wrote the code in codetags, it still removed the li and p tags in the second part of code. Hope it&#8217;s still clear.</p> ]]></content:encoded> </item> <item><title>By: Tweeks</title><link>http://www.elanman.co.uk/2009/05/simple-pagination/comment-page-1/#comment-348</link> <dc:creator>Tweeks</dc:creator> <pubDate>Tue, 11 Oct 2011 14:05:37 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=829#comment-348</guid> <description>@Simon, I was also trying this and I think I fixed it with my noobish PHP skills. My solution is a bit late for you, but maybe it can help someone. It&#039;s probably not the clean way but here it goes:
In the parameters of the function, add a second field: &lt;b&gt;, $field2&lt;/b&gt;
&lt;code&gt;function paginate ($perpage,$table,$field, $field2) {&lt;/code&gt;
Now in the following piece of code you can just add: &lt;b&gt;$list[$field2]&lt;/b&gt; after the first one.
&lt;code&gt; //produce a html list showing the results
$output = &quot;\n&quot;;
while ($list = mysql_fetch_assoc($results)) {
$output .= &#039;&#039; . $list[$field] .&#039;&#039;. $list[$field2] .&#039;&#039;;
}
$output .= &quot;\n&quot;;
&lt;/code&gt;
You can change the position of $list[$field2],  and  to your liking of course. Just remember to set the dots and quotation marks right.
Don&#039;t forget to also fill $field2 on your output page with something of the same table:
&lt;code&gt;paginate(10, &#039;news&#039;, &#039;title&#039;, &#039;content&#039;);&lt;/code&gt;</description> <content:encoded><![CDATA[<p>@Simon, I was also trying this and I think I fixed it with my noobish PHP skills. My solution is a bit late for you, but maybe it can help someone. It&#8217;s probably not the clean way but here it goes:</p><p>In the parameters of the function, add a second field: <b>, $field2</b></p><p><code>function paginate ($perpage,$table,$field, $field2) {</code></p><p>Now in the following piece of code you can just add: <b>$list[$field2]</b> after the first one.</p><p><code> //produce a html list showing the results<br
/> $output = "\n";<br
/> while ($list = mysql_fetch_assoc($results)) {<br
/> $output .= '' . $list[$field] .''. $list[$field2] .'';<br
/> }<br
/> $output .= "\n";<br
/> </code></p><p>You can change the position of $list[$field2],  and  to your liking of course. Just remember to set the dots and quotation marks right.</p><p>Don&#8217;t forget to also fill $field2 on your output page with something of the same table:</p><p><code>paginate(10, 'news', 'title', 'content');</code></p> ]]></content:encoded> </item> <item><title>By: Simon</title><link>http://www.elanman.co.uk/2009/05/simple-pagination/comment-page-1/#comment-186</link> <dc:creator>Simon</dc:creator> <pubDate>Thu, 06 May 2010 11:49:06 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=829#comment-186</guid> <description>Elanman,
Great code thanks.
Got it working with my database, however you are showing &quot;title - fields&quot; from &quot;news - table&quot;.
I&#039;m showing say &quot;id - field&quot; from &quot;images - table&quot;.
How do I include more fields to display from my table?
e.g &quot;id - field, item - field, description - field&quot;.
Cheers</description> <content:encoded><![CDATA[<p>Elanman,<br
/> Great code thanks.<br
/> Got it working with my database, however you are showing &#8220;title &#8211; fields&#8221; from &#8220;news &#8211; table&#8221;.<br
/> I&#8217;m showing say &#8220;id &#8211; field&#8221; from &#8220;images &#8211; table&#8221;.<br
/> How do I include more fields to display from my table?<br
/> e.g &#8220;id &#8211; field, item &#8211; field, description &#8211; field&#8221;.</p><p>Cheers</p> ]]></content:encoded> </item> <item><title>By: connor</title><link>http://www.elanman.co.uk/2009/05/simple-pagination/comment-page-1/#comment-184</link> <dc:creator>connor</dc:creator> <pubDate>Mon, 03 May 2010 18:17:18 +0000</pubDate> <guid
isPermaLink="false">http://www.elanman.co.uk/?p=829#comment-184</guid> <description>awesome stuff, gonna bookmark this</description> <content:encoded><![CDATA[<p>awesome stuff, gonna bookmark this</p> ]]></content:encoded> </item> </channel> </rss>
