do not use count(distinct) for SQLite
This commit is contained in:
parent
61be3385e3
commit
63fe29e942
@ -473,6 +473,12 @@ class serendipity_archives_plugin extends serendipity_plugin {
|
|||||||
|
|
||||||
echo '<ul>' . "\n";
|
echo '<ul>' . "\n";
|
||||||
|
|
||||||
|
if ($serendipity['dbType'] == 'sqlite' || $serendipity['dbType'] == 'sqlite3') {
|
||||||
|
$dist_sql = 'count(e.id) AS orderkey';
|
||||||
|
} else {
|
||||||
|
$dist_sql = 'count(DISTINCT e.id) AS orderkey';
|
||||||
|
}
|
||||||
|
|
||||||
for($x = 0; $x < $max_x; $x++) {
|
for($x = 0; $x < $max_x; $x++) {
|
||||||
$current_ts = $ts;
|
$current_ts = $ts;
|
||||||
switch($freq) {
|
switch($freq) {
|
||||||
@ -552,7 +558,7 @@ class serendipity_archives_plugin extends serendipity_plugin {
|
|||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
'count(DISTINCT e.id) AS orderkey',
|
$dist_sql,
|
||||||
'',
|
'',
|
||||||
'single',
|
'single',
|
||||||
false, $category_set // the joins used
|
false, $category_set // the joins used
|
||||||
|
Loading…
x
Reference in New Issue
Block a user