Suppress all the uses of LIMIT in the get_field_sql() calls. MDL-7173

Merged from MOODLE_17_STABLE
This commit is contained in:
stronk7
2006-10-23 16:03:52 +00:00
parent 2f1a42481d
commit 37c47abaca
5 changed files with 16 additions and 17 deletions
+2 -2
View File
@@ -468,7 +468,7 @@ function stats_get_start_from($str) {
global $CFG;
// if it's not our first run, just return the most recent.
if ($timeend = get_field_sql('SELECT timeend FROM '.$CFG->prefix.'stats_'.$str.' ORDER BY timeend DESC LIMIT 1')) {
if ($timeend = get_field_sql('SELECT timeend FROM '.$CFG->prefix.'stats_'.$str.' ORDER BY timeend DESC')) {
return $timeend;
}
@@ -476,7 +476,7 @@ function stats_get_start_from($str) {
$function = 'stats_get_base_'.$str;
switch ($CFG->statsfirstrun) {
case 'all':
return $function(get_field_sql('SELECT time FROM '.$CFG->prefix.'log ORDER BY time LIMIT 1'));
return $function(get_field_sql('SELECT time FROM '.$CFG->prefix.'log ORDER BY time'));
break;
case 'none':
return $function(strtotime('-1 day',time()));