<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de-AT">
	<id>http://niki.hammler.net/w/index.php?action=history&amp;feed=atom&amp;title=ZendFramework_Pager</id>
	<title>ZendFramework Pager - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="http://niki.hammler.net/w/index.php?action=history&amp;feed=atom&amp;title=ZendFramework_Pager"/>
	<link rel="alternate" type="text/html" href="http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;action=history"/>
	<updated>2026-05-12T16:56:59Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in NOBAQ</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=735&amp;oldid=prev</id>
		<title>Niki am 2. Mai 2009 um 20:53 Uhr</title>
		<link rel="alternate" type="text/html" href="http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=735&amp;oldid=prev"/>
		<updated>2009-05-02T20:53:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 2. Mai 2009, 20:53 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot; &gt;Zeile 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section end=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section end=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= Das neue mySQL Feature &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Das neue mySQL Feature =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In mySQL 5 gibt es ein neues Feature: Fügt man einem SELECT-Statement ein SQL_CALC_FOUND_ROWS zu, so berechnet mySQL im Hintergrund automatisch die Größe des Datensatzes ohne LIMIT-Statement. Dieses kann mit&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In mySQL 5 gibt es ein neues Feature: Fügt man einem SELECT-Statement ein SQL_CALC_FOUND_ROWS zu, so berechnet mySQL im Hintergrund automatisch die Größe des Datensatzes ohne LIMIT-Statement. Dieses kann mit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot; &gt;Zeile 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;abgefragt werden.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;abgefragt werden.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= Problem in ZendFramework &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Problem in ZendFramework =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Zend_Db_Select Klasse im ZendFramework hat leider keine Unterstützung für dieses Feature (zumal die Klasse mit anderen RDBMS kompatibel sein soll). Leider lässt sich die Klasse auch schwer erweitern, da die Informationen über den Aufbau eines SELECT Statements in einem statischen Array stehen :-(&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Die Zend_Db_Select Klasse im ZendFramework hat leider keine Unterstützung für dieses Feature (zumal die Klasse mit anderen RDBMS kompatibel sein soll). Leider lässt sich die Klasse auch schwer erweitern, da die Informationen über den Aufbau eines SELECT Statements in einem statischen Array stehen :-(&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot; &gt;Zeile 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= ViewHelper &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= ViewHelper =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Fehlt nur mehr ein View-Helper, in dem man die Generierung des Pagers verpackt:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Fehlt nur mehr ein View-Helper, in dem man die Generierung des Pagers verpackt:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l130&quot; &gt;Zeile 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;= Alles zusammen &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Alles zusammen =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Für die Übergabe vom Controller an den Viewhelper hab ich (sinniger- oder unsinnigerweise) eine einfache Klasse Pager erstellt. Die Routen sind so eingerichtet, dass sie optional einen page-Parameter erhalten. Der Default-Wert ist dabei auf 1.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Für die Übergabe vom Controller an den Viewhelper hab ich (sinniger- oder unsinnigerweise) eine einfache Klasse Pager erstellt. Die Routen sind so eingerichtet, dass sie optional einen page-Parameter erhalten. Der Default-Wert ist dabei auf 1.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l151&quot; &gt;Zeile 151:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 151:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;pager_bar&amp;quot;&amp;gt;&amp;lt;?=$this-&amp;gt;pager($this-&amp;gt;pager)?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;pager_bar&amp;quot;&amp;gt;&amp;lt;?=$this-&amp;gt;pager($this-&amp;gt;pager)?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;= Kommentare =&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;comments /&amp;gt;{{:{{TALKSPACE}}:{{PAGENAME}}}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Weblog]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Weblog]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Niki</name></author>
	</entry>
	<entry>
		<id>http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=639&amp;oldid=prev</id>
		<title>Niki am 15. Juli 2008 um 18:42 Uhr</title>
		<link rel="alternate" type="text/html" href="http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=639&amp;oldid=prev"/>
		<updated>2008-07-15T18:42:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 15. Juli 2008, 18:42 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Bild:zflogo.jpg]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Bild:zflogo.jpg&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|right&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite dargestellt werden und der Rest durch &amp;quot;Blättern&amp;quot; mit &amp;quot;vor&amp;quot; und &amp;quot;zurück&amp;quot; zugänglich sein. Die normale Herangehensweise in PHP ist es zusätzlich zur normalen Abfrage (durch LIMIT begrenz), ein SQL Statement mit &amp;quot;SELECT COUNT(*) ... GROUP BY&amp;quot; zu erstellen. Der Nachteil dabei ist aber, dass zwei Abfragen benötigt werden, und die eigentliche Datenabfrage umgeändert werden muss. Ist die ursprüngliche Abfrage sehr komplex (z.B. Nested Sets, Verknüpfungen mit temporären Tabellen) ist diese Methode sehr komplex.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite dargestellt werden und der Rest durch &amp;quot;Blättern&amp;quot; mit &amp;quot;vor&amp;quot; und &amp;quot;zurück&amp;quot; zugänglich sein. Die normale Herangehensweise in PHP ist es zusätzlich zur normalen Abfrage (durch LIMIT begrenz), ein SQL Statement mit &amp;quot;SELECT COUNT(*) ... GROUP BY&amp;quot; zu erstellen. Der Nachteil dabei ist aber, dass zwei Abfragen benötigt werden, und die eigentliche Datenabfrage umgeändert werden muss. Ist die ursprüngliche Abfrage sehr komplex (z.B. Nested Sets, Verknüpfungen mit temporären Tabellen) ist diese Methode sehr komplex.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l151&quot; &gt;Zeile 151:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 151:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;pager_bar&amp;quot;&amp;gt;&amp;lt;?=$this-&amp;gt;pager($this-&amp;gt;pager)?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;pager_bar&amp;quot;&amp;gt;&amp;lt;?=$this-&amp;gt;pager($this-&amp;gt;pager)?&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Kategorie:Weblog]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Niki</name></author>
	</entry>
	<entry>
		<id>http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=637&amp;oldid=prev</id>
		<title>Niki am 15. Juli 2008 um 18:41 Uhr</title>
		<link rel="alternate" type="text/html" href="http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=637&amp;oldid=prev"/>
		<updated>2008-07-15T18:41:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de-AT&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 15. Juli 2008, 18:41 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Bild:zflogo.jpg]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite dargestellt werden und der Rest durch &amp;quot;Blättern&amp;quot; mit &amp;quot;vor&amp;quot; und &amp;quot;zurück&amp;quot; zugänglich sein. Die normale Herangehensweise in PHP ist es zusätzlich zur normalen Abfrage (durch LIMIT begrenz), ein SQL Statement mit &amp;quot;SELECT COUNT(*) ... GROUP BY&amp;quot; zu erstellen. Der Nachteil dabei ist aber, dass zwei Abfragen benötigt werden, und die eigentliche Datenabfrage umgeändert werden muss. Ist die ursprüngliche Abfrage sehr komplex (z.B. Nested Sets, Verknüpfungen mit temporären Tabellen) ist diese Methode sehr komplex.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite dargestellt werden und der Rest durch &amp;quot;Blättern&amp;quot; mit &amp;quot;vor&amp;quot; und &amp;quot;zurück&amp;quot; zugänglich sein. Die normale Herangehensweise in PHP ist es zusätzlich zur normalen Abfrage (durch LIMIT begrenz), ein SQL Statement mit &amp;quot;SELECT COUNT(*) ... GROUP BY&amp;quot; zu erstellen. Der Nachteil dabei ist aber, dass zwei Abfragen benötigt werden, und die eigentliche Datenabfrage umgeändert werden muss. Ist die ursprüngliche Abfrage sehr komplex (z.B. Nested Sets, Verknüpfungen mit temporären Tabellen) ist diese Methode sehr komplex.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Niki</name></author>
	</entry>
	<entry>
		<id>http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=636&amp;oldid=prev</id>
		<title>Niki: Die Seite wurde neu angelegt: &lt;section begin=&quot;head&quot;/&gt; Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &quot;Paging&quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite darg...</title>
		<link rel="alternate" type="text/html" href="http://niki.hammler.net/w/index.php?title=ZendFramework_Pager&amp;diff=636&amp;oldid=prev"/>
		<updated>2008-07-15T18:38:50Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: &amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt; Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite darg...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;section begin=&amp;quot;head&amp;quot;/&amp;gt;&lt;br /&gt;
Ein oft wiederkehrendes Problem bei Webseiten ist ein sogenanntes &amp;quot;Paging&amp;quot;: Von einer Tabelle mit 1000 Zeilen sollen nur 10 auf einer Seite dargestellt werden und der Rest durch &amp;quot;Blättern&amp;quot; mit &amp;quot;vor&amp;quot; und &amp;quot;zurück&amp;quot; zugänglich sein. Die normale Herangehensweise in PHP ist es zusätzlich zur normalen Abfrage (durch LIMIT begrenz), ein SQL Statement mit &amp;quot;SELECT COUNT(*) ... GROUP BY&amp;quot; zu erstellen. Der Nachteil dabei ist aber, dass zwei Abfragen benötigt werden, und die eigentliche Datenabfrage umgeändert werden muss. Ist die ursprüngliche Abfrage sehr komplex (z.B. Nested Sets, Verknüpfungen mit temporären Tabellen) ist diese Methode sehr komplex.&lt;br /&gt;
&lt;br /&gt;
Meine Lösung für ZendFramework beschreibe ich hier.&lt;br /&gt;
&amp;lt;section end=&amp;quot;head&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Das neue mySQL Feature ==&lt;br /&gt;
&lt;br /&gt;
In mySQL 5 gibt es ein neues Feature: Fügt man einem SELECT-Statement ein SQL_CALC_FOUND_ROWS zu, so berechnet mySQL im Hintergrund automatisch die Größe des Datensatzes ohne LIMIT-Statement. Dieses kann mit&lt;br /&gt;
&lt;br /&gt;
 SELECT FOUND_ROWS()&lt;br /&gt;
&lt;br /&gt;
abgefragt werden.&lt;br /&gt;
&lt;br /&gt;
== Problem in ZendFramework ==&lt;br /&gt;
&lt;br /&gt;
Die Zend_Db_Select Klasse im ZendFramework hat leider keine Unterstützung für dieses Feature (zumal die Klasse mit anderen RDBMS kompatibel sein soll). Leider lässt sich die Klasse auch schwer erweitern, da die Informationen über den Aufbau eines SELECT Statements in einem statischen Array stehen :-(&lt;br /&gt;
&lt;br /&gt;
Folgende Klasse erweitert dennoch Zend_Db_Select - wenn auch auf nicht so schöne Art und Weise:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class Zend_Db_Select_Extended extends Zend_Db_Select&lt;br /&gt;
{&lt;br /&gt;
        const CALC_FOUND_ROWS = &amp;#039;calc_found_rows&amp;#039;;&lt;br /&gt;
        const SQL_CALC_FOUND_ROWS = &amp;#039;SQL_CALC_FOUND_ROWS&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
        public function __construct(Zend_Db_Adapter_Abstract $adapter)&lt;br /&gt;
        {&lt;br /&gt;
                parent::__construct($adapter);&lt;br /&gt;
                $this-&amp;gt;_parts[self::CALC_FOUND_ROWS] = false;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        public function calcFoundRows($flag = true)&lt;br /&gt;
        {&lt;br /&gt;
                $this-&amp;gt;_parts[self::CALC_FOUND_ROWS] = (bool) $flag;&lt;br /&gt;
                return $this;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        public function __toString()&lt;br /&gt;
        {&lt;br /&gt;
                $sql = parent::__toString();&lt;br /&gt;
&lt;br /&gt;
                if($this-&amp;gt;_parts[self::CALC_FOUND_ROWS])&lt;br /&gt;
                {&lt;br /&gt;
                        $sql = preg_replace(&amp;#039;/^&amp;#039; . self::SQL_SELECT . &amp;#039;/&amp;#039;, self::SQL_SELECT . &amp;#039; &amp;#039;  . self::SQL_CALC_FOUND_ROWS, $sql);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                return $sql;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Das Feature kann nun ganz normal verwendet werden, z.B. mit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$select = new Zend_Db_Select_Extended( Zend_Registry::get(&amp;#039;db&amp;#039;) );&lt;br /&gt;
// [...]&lt;br /&gt;
// erstelle kompliziertes SQL statement&lt;br /&gt;
//&lt;br /&gt;
$select-&amp;gt;limitToPage($page, 10);&lt;br /&gt;
&lt;br /&gt;
$sel2 = Zend_Registry::get(&amp;#039;db&amp;#039;)-&amp;gt;select()-&amp;gt;from(&amp;#039;&amp;#039;, new Zend_Db_Expr(&amp;#039;FOUND_ROWS()&amp;#039;));&lt;br /&gt;
&lt;br /&gt;
$pages_count = ceil($sel2-&amp;gt;query()-&amp;gt;fetchColumn() / 10);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ViewHelper ==&lt;br /&gt;
&lt;br /&gt;
Fehlt nur mehr ein View-Helper, in dem man die Generierung des Pagers verpackt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
class View_Helper_Pager&lt;br /&gt;
{&lt;br /&gt;
        private $view;&lt;br /&gt;
&lt;br /&gt;
        public function __construct()&lt;br /&gt;
        {&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        public function setView(Zend_View $view)&lt;br /&gt;
        {&lt;br /&gt;
                $this-&amp;gt;view = $view;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        public function Pager(Pager $pager)&lt;br /&gt;
        {&lt;br /&gt;
                if($pager-&amp;gt;getNumPages() &amp;lt;= 1)&lt;br /&gt;
                {&lt;br /&gt;
                        return &amp;#039;&amp;#039;;&lt;br /&gt;
                }&lt;br /&gt;
                $code = &amp;#039;&amp;lt;ul id=&amp;quot;pager&amp;quot;&amp;gt;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
                if($pager-&amp;gt;getCurrentPage() &amp;gt; 1)&lt;br /&gt;
                {&lt;br /&gt;
                        $url = $this-&amp;gt;view-&amp;gt;url(array(&amp;#039;page&amp;#039; =&amp;gt; 1));&lt;br /&gt;
                        $code .= &amp;quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&amp;quot;$url\&amp;quot;&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
                        $url = $this-&amp;gt;view-&amp;gt;url(array(&amp;#039;page&amp;#039; =&amp;gt; $pager-&amp;gt;getCurrentPage() - 1));&lt;br /&gt;
                        $code .= &amp;quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&amp;quot;$url\&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                for($i = 1; $i &amp;lt;= $pager-&amp;gt;getNumPages(); $i++)&lt;br /&gt;
                {&lt;br /&gt;
                        if($i == $pager-&amp;gt;getCurrentPage())&lt;br /&gt;
                        {&lt;br /&gt;
                                $code .= &amp;quot;&amp;lt;li&amp;gt;$i&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                        else&lt;br /&gt;
                        {&lt;br /&gt;
                                $url = $this-&amp;gt;view-&amp;gt;url(array(&amp;#039;page&amp;#039; =&amp;gt; $i));&lt;br /&gt;
                                $code .= &amp;quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&amp;quot;$url\&amp;quot;&amp;gt;$i&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if($pager-&amp;gt;getCurrentPage() &amp;lt; $pager-&amp;gt;getNumPages())&lt;br /&gt;
                {&lt;br /&gt;
                        $url = $this-&amp;gt;view-&amp;gt;url(array(&amp;#039;page&amp;#039; =&amp;gt; $pager-&amp;gt;getCurrentPage() + 1));&lt;br /&gt;
                        $code .= &amp;quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&amp;quot;$url\&amp;quot;&amp;gt;&amp;amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
                        $url = $this-&amp;gt;view-&amp;gt;url(array(&amp;#039;page&amp;#039; =&amp;gt; $pager-&amp;gt;getNumPages()));&lt;br /&gt;
                        $code .= &amp;quot;&amp;lt;li&amp;gt;&amp;lt;a href=\&amp;quot;$url\&amp;quot;&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                $code .= &amp;#039;&amp;lt;/ul&amp;gt;&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
                return $code;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Alles zusammen ==&lt;br /&gt;
&lt;br /&gt;
Für die Übergabe vom Controller an den Viewhelper hab ich (sinniger- oder unsinnigerweise) eine einfache Klasse Pager erstellt. Die Routen sind so eingerichtet, dass sie optional einen page-Parameter erhalten. Der Default-Wert ist dabei auf 1.&lt;br /&gt;
&lt;br /&gt;
Die Anwendung des Zend_Db_Select_Extended Statements hab ich in mein Datenmodell verpackt, hier z.B. ProductListModel. Demensprechend schaut der Part im Controller aus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Parameter vom ZF holen&lt;br /&gt;
$page = $this-&amp;gt;getRequest()-&amp;gt;getExt(&amp;#039;param&amp;#039;);&lt;br /&gt;
// Das Datenmodell instanzieren. Für das LIMIT-Statement wird natürlich die aktuelle Seite benötigt&lt;br /&gt;
$product_list = new ProductListModel(..., $page);&lt;br /&gt;
&lt;br /&gt;
// Dem VIEW einach die Pager Infos zuweisen:&lt;br /&gt;
$this-&amp;gt;view-&amp;gt;assign(&amp;#039;pager&amp;#039;, new Pager($page, $product_list-&amp;gt;getPageCount()));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
und alles, was im View noch geschenen muss, ist (z.B. unter der Ausgabetabelle):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;pager_bar&amp;quot;&amp;gt;&amp;lt;?=$this-&amp;gt;pager($this-&amp;gt;pager)?&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Niki</name></author>
	</entry>
</feed>