DeLIMITing Moodle core. Now the new $limitfrom,
$limitnum parameters are used instead. MDL-7168
This commit is contained in:
+3
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user