From: Edward Date: Mon, 20 Oct 2014 08:50:00 +0000 (+0800) Subject: UpdateCurrencyRate.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=8a3d98954b2496920011e5b287275d04007f83d1 UpdateCurrencyRate.php --- diff --git a/UpdateCurrencyRate.php b/UpdateCurrencyRate.php index a5e2c7a4..04b63b04 100644 --- a/UpdateCurrencyRate.php +++ b/UpdateCurrencyRate.php @@ -104,9 +104,9 @@ class Pman_Core_UpdateCurrencyRate extends Pman 'from' => date('Y-m-d H:i:s', strtotime($fromDate)), 'to' => date('Y-m-d H:i:s', strtotime($toDate)) )); -print_R($o);exit; + (empty($o)) ? $curr->insert() : $curr->update($o); - + print_R($curr);exit; $this->jok("DONE"); }