Hi Garvin,
I use MySQL 5.0.27 with php 5.2.
without the fix i get 1 for the count of entries for every month in the list of 'older entries' (Archives).
File:
$Id: functions_entries.inc.php 1520 2006-11-30 21:34:29Z garvinhicking $
I found the problem in row 1471:
function serendipity ...
Search found 2 matches
- Tue Feb 20, 2007 12:43 pm
- Forum: Bugs
- Topic: bug in counting entries
- Replies: 3
- Views: 2164
- Fri Feb 16, 2007 5:33 pm
- Forum: Bugs
- Topic: bug in counting entries
- Replies: 3
- Views: 2164
bug in counting entries
functions_entries.inc.php
$entries =& serendipity_db_query("SELECT count(id) ...
$entry_count will be 1 in all cases.
fix:
$entries =& serendipity_db_query("SELECT count(id) AS cnt ...
if (is_array($entries)) {
// this returns 1 in all cases! $entry_count = count($entries);
$entry_count ...
$entries =& serendipity_db_query("SELECT count(id) ...
$entry_count will be 1 in all cases.
fix:
$entries =& serendipity_db_query("SELECT count(id) AS cnt ...
if (is_array($entries)) {
// this returns 1 in all cases! $entry_count = count($entries);
$entry_count ...