<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1029139" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1029139</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170634</link>
    <description> &lt;p&gt;Yeah I am 4.0 also. I am just using 2 queries.  You&#039;d think something simple like this wouldn&#039;t be a problem.  Oh well!&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 May 2005 15:23:45 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1170634 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170593</link>
    <description> &lt;p&gt;If you debugID&#039;s do not skip any numbers, from what I was reading in the manual, this should work if you are using mySQL 4.1 or above.&lt;br /&gt;
(sadly I&#039;m at 4.0 something so I can&#039;t test it...)&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: SELECT DebugID, DebugText&lt;br /&gt;
FROM Debug&lt;br /&gt;
WHERE DebugID &amp;gt; (SELECT MAX(DebugID)-10 FROM Debug)&lt;br /&gt;
ORDER BY DebugID ASC &lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Wed, 04 May 2005 17:45:56 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1170593 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170591</link>
    <description> &lt;p&gt;Yup sorry MySql is what I am using. Bummer.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 May 2005 16:46:24 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1170591 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170590</link>
    <description> &lt;p&gt;if it is only 10 items, try something like this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;?&lt;br /&gt;&lt;br /&gt;	// already opened and did the sql query with&lt;br /&gt;	// resutls into $dbResult&lt;br /&gt;&lt;br /&gt;	$arDebug = array();&lt;br /&gt;	&lt;br /&gt;	while ($thisRow = mysql_fetch_assoc($dbResult))&lt;br /&gt;		$arDebug[$thisRow[&amp;#039;DebugID&amp;#039;]] = $thisRow[&amp;#039;DebugText&amp;#039;];&lt;br /&gt;	&lt;br /&gt;	ksort($arDebug);&lt;br /&gt;	reset($arDebug);&lt;br /&gt;	&lt;br /&gt;	// Close database connection if not needed further&lt;br /&gt;	// You now have a 10 element array with data in order&lt;br /&gt;	&lt;br /&gt;	echo &amp;quot;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th colspan=2&amp;gt;Debug Info&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;	foreach ($arDebug as $key =&amp;gt; $value)&lt;br /&gt;		echo &amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$key&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$value&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;\n&amp;quot;;&lt;br /&gt;	echo &amp;quot;&amp;lt;/table&amp;gt;\n&amp;quot;;&lt;br /&gt;&lt;br /&gt;?&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 May 2005 16:38:27 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1170590 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170588</link>
    <description> &lt;p&gt;Not sure what DB you&#039;re using, but if it allows nested SQL statements in a LIMIT statement, the following should work:&lt;/p&gt;
&lt;p&gt;SELECT DebugID, DebugText FROM Debug ORDER BY DebugID ASC LIMIT (SELECT COUNT(*) FROM Debug)-10, 10&lt;/p&gt;
&lt;p&gt;If it won&#039;t allow it (I don&#039;t think mySQL will), you&#039;ll have to execute the nested one, pull in the count, then execute the other.&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 May 2005 15:04:23 +0000</pubDate>
 <dc:creator>timjpriebe</dc:creator>
 <guid isPermaLink="false">comment 1170588 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170587</link>
    <description> &lt;p&gt;All that does is get the first 10 records.&lt;/p&gt;
&lt;p&gt;Looks like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt; 1 | Hello Hello Hello&lt;br /&gt; 2 | Hello Hello Hello&lt;br /&gt; 3 | Hello Hello Hello&lt;br /&gt; 4 | Hello Hello Hello&lt;br /&gt; 5 | Hello Hello Hello&lt;br /&gt; 6 | Hello Hello Hello&lt;br /&gt; 7 | Hello Hello Hello&lt;br /&gt; 8 | Hello Hello Hello&lt;br /&gt; 9 | Hello Hello Hello&lt;br /&gt;10 | Hello Hello Hello&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Any other suggestions? &lt;/p&gt;
&lt;p&gt;-dk&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 May 2005 14:52:52 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1170587 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-database-development/show-last-10-records-table#comment-1170576</link>
    <description> &lt;p&gt;&lt;code&gt;ORDER BY column ASC&amp;nbsp; &lt;/code&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 May 2005 08:13:26 +0000</pubDate>
 <dc:creator>chrishirst</dc:creator>
 <guid isPermaLink="false">comment 1170576 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
