1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-20 23:11:28 +00:00

update_daemon work, remove unneeded indexes, query optimizations

This commit is contained in:
Andrew Dolgov
2006-03-21 08:09:18 +01:00
parent ac92cb46be
commit 894ebcf5e9
6 changed files with 43 additions and 24 deletions

View File

@@ -1,10 +1,10 @@
<?
if ($_GET["debug"]) {
/* if ($_GET["debug"]) {
define('DEFAULT_ERROR_LEVEL', E_ALL);
} else {
define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
}
} */
require_once 'config.php';
require_once 'db-prefs.php';
@@ -56,11 +56,7 @@
function global_purge_old_posts($link, $do_output = false, $limit = false) {
if (DB_TYPE == "mysql") {
$random_qpart = "RAND()";
} else {
$random_qpart = "RANDOM()";
}
$random_qpart = sql_random_function();
if ($limit) {
$limit_qpart = "LIMIT $limit";
@@ -1044,4 +1040,12 @@
}
}
function sql_random_function() {
if (DB_TYPE == "mysql") {
return "RAND()";
} else {
return "RANDOM()";
}
}
?>