From c28b13eaeca04574994d5a7c2320bbce4c63450f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 1 Nov 2010 08:46:05 +0100 Subject: add new TableRpmRepo->getMaxStamp() method and use it --- class/TableRpmRepo.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'class/TableRpmRepo.php') diff --git a/class/TableRpmRepo.php b/class/TableRpmRepo.php index a8ae44f..3144abe 100644 --- a/class/TableRpmRepo.php +++ b/class/TableRpmRepo.php @@ -108,6 +108,18 @@ class TableRpmRepo extends CommonTable } return $res; } + + /** + * Retrieve the greater update date + */ + function getMaxStamp() { + + $sql='SELECT MAX(stamp) AS stamp FROM '.$this->table; + foreach ($this->request($sql) as $res) { + return $res['stamp']; + } + return 0; + } } ?> \ No newline at end of file -- cgit