OpenCart 🇺🇦

Схема

public mixed getDownloads ( $start = 0, $limit = 20 )

Аргументы

Аргумент Возможный тип Описание
$start = 0
$limit = 20

Описание

Метод пока еще не документирован.

Исходный код

if ($start < 0) {
	$start = 0;
}

if ($limit < 1) {
	$limit = 20;
}	

$query = $this->db->query("SELECT o.order_id, o.date_added, od.order_download_id, od.name, od.filename, od.remaining FROM " . DB_PREFIX . "order_download od LEFT JOIN `" . DB_PREFIX . "order` o ON (od.order_id = o.order_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.order_status_id = '" . (int)$this->config->get('config_complete_status_id') . "' AND od.remaining > 0 ORDER BY o.date_added DESC LIMIT " . (int)$start . "," . (int)$limit);

return $query->rows;