<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.bytemycode.com/rssformat.xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>byteMyCode: Snippet Revisions</title>
		<link>http://www.bytemycode.com</link>
		<description>Revisions for this snippet.</description>
		<pubDate>Tue, 07 Oct 2008 20:34:12 +0000</pubDate>
		<copyright>1998-2008 </copyright>
		<language>en-us</language>
		<image>
		      <link>http://www.bytemycode.com</link>
		      <url>http://www.bytemycode.com/img/rss_title.gif</url>
		      <title>byteMyCode</title>
		</image>

	
	<item>
		<title>Advanced ADODB Pager 1</title>
		<link>http://www.bytemycode.com/snippets/snippet/544/1/</link>
		<comments>http://www.bytemycode.com/snippets/snippet/544/comments/</comments>
		<pubDate>Sun, 19 Nov 2006 12:30:50 +0000</pubDate>
		<dc:creator>pcolella</dc:creator>
		<category>PHP</category>
		<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/544/</guid>
		<description>
			<![CDATA[
				<p>This is a rewrite of a basic ADODB / PHP Database pager. This pager has some very slick search, sort, and display configuration options. Modifications and improvements are very welcome. Thus I am sharing this code.<br /><br />A basic example for using this pager would be as follows:<br /><br />// Check class code for CSS styles used<br />require_once ('class.init.php');<br /><br />// SQL Statement<br />$sql = 'SELECT table1.field1, table1.field2, table1.field3 FROM table1';<br /><br />// Field Labels<br />$label_arr = array ( <br />	'field1' => 'Field 1 Heading',<br />	'field2' => 'Field 2 Heading',<br />	'field3' => 'Field 3 Heading'<br />);<br /><br />// Hidden Fields<br />$vsel_arr = array (<br />	'field3' => 0 // don't display field3 unless requested by the user<br />);<br /><br />$sort_arr = array (<br />	'field1' => 'asc' // sort by field1 ascending order (asc) or (desc)<br />);<br /><br />// Config array<br />$config = array (<br />	'db' => &$dbconn, // open ADODB connection<br />	'sql' => $sql, // String of sql<br />	'id' => 'table1_pager', // pager id for session variables<br />	'label_arr' => $label_arr, // field heading array<br />	'vsel_arr' => $vsel_arr, // fields to hide<br />	'extra_param' => '', // extra paramaters to pass with edit, delete, add anchors<br />	'form_width' => '100%', // table with<br />	'form_title' => 'Table 1', // table title<br />	'edit_anchor' => 'Edit', // link to edit<br />	'del_anchor' => 'Del', // link to delete<br />	'add_anchor' => 'Add', // link to add<br />	'print_anchor' => 'Print', // link to print<br />	'header_view' => true, // no function at this time<br />	'search_view' => true, // no function at this time<br />	'pk' => array ('field1' => true), // primary key field<br />	'sort_arr' => $sort_arr, // sort field array<br />);<br /><br />// create object then render it ...<br />$_pager = new pager($config); // create instance<br />echo $_pager->render(25); // render output<br /></p>
			]]>
		</description>
	</item>

	
	</channel>
</rss>