SQL bug in serendipity_event_entrypaging
Posted: Fri Sep 19, 2008 9:27 pm
The plugin "serendipity_event_entrypaging" contains a small glitch:
The "RAND()" must be "RANDOM()" for databases other than MySQL.
In plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php is a bugfix available:
Code: Select all
$querystring = "SELECT
e.id, e.title, e.timestamp
FROM
{$serendipity['dbPrefix']}entries e
WHERE
{$cond['compare2']}
ORDER BY RAND()
LIMIT 1";
In plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php is a bugfix available:
Code: Select all
if ($db == 'mysql' || $db == 'mysqli') {
$sql_order = "ORDER BY RAND()";
} else {
// SQLite and PostgreSQL support this, hooray.
$sql_order = "ORDER BY RANDOM()";
}