From: Edward Date: Mon, 20 Oct 2014 08:49:31 +0000 (+0800) Subject: UpdateCurrencyRate.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=3582270fbdf517259ae42f2b591132e0c6116869 UpdateCurrencyRate.php --- diff --git a/UpdateCurrencyRate.php b/UpdateCurrencyRate.php index 63ba6449..5f802764 100644 --- a/UpdateCurrencyRate.php +++ b/UpdateCurrencyRate.php @@ -98,13 +98,13 @@ class Pman_Core_UpdateCurrencyRate extends Pman if($curr->find(true)){ $o = clone($curr); } - print_R($curr);exit; + $curr->setFrom(array( 'rate' => $rate, 'from' => date('Y-m-d H:i:s', strtotime($fromDate)), 'to' => date('Y-m-d H:i:s', strtotime($toDate)) )); - +print_R($curr);exit; (empty($o)) ? $curr->insert() : $curr->update($o); $this->jok("DONE");