DeLIMITing Moodle core. Now the new $limitfrom,

$limitnum parameters are used instead. MDL-7168
This commit is contained in:
stronk7
2006-10-24 21:55:54 +00:00
parent e2c0f78d63
commit eb2d09c49c
5 changed files with 18 additions and 27 deletions
+3 -4
View File
@@ -38,12 +38,11 @@
$approved = ($data->approval) ? ' AND dr.approved = 1 ' : ' ';
$sql = 'SELECT dr.* ' .
"FROM {$CFG->prefix}data_records AS dr " .
"FROM {$CFG->prefix}data_records dr " .
"WHERE dr.dataid = {$data->id} " .$approved.
'ORDER BY dr.timecreated DESC ' .
"LIMIT {$data->rssarticles}";
'ORDER BY dr.timecreated DESC';
if (!$records = get_records_sql($sql)) {
if (!$records = get_records_sql($sql, 0, $data->rssarticles)) {
continue;
}