public function update()
 {
     $sql = "UPDATE debts SET\n                payment_id = '" . mysql_real_escape_string($this->getPayment_id()) . "',\n                amount = '" . mysql_real_escape_string($this->getAmount()) . "',\n                owed_by = '" . mysql_real_escape_string($this->getOwed_by()) . "',\n                owed_to = '" . mysql_real_escape_string($this->getOwed_to()) . "',\n                archived = '" . mysql_real_escape_string($this->getArchived()) . "'\n                WHERE id = " . mysql_real_escape_string($this->getId());
     $result = mysql_query($sql);
     //exit($sql);
     if (mysql_errno()) {
         LogSql::log(date("Y-m-d H:i:s") . " " . mysql_error() . ", " . __FILE__ . " [" . __LINE__ . "]");
         return false;
     } else {
         return true;
     }
 }
 public function update()
 {
     $sql = "UPDATE payments SET\n                total = '" . mysql_real_escape_string($this->getTotal()) . "',\n                date = '" . mysql_real_escape_string($this->getDate()) . "',\n                user_id = '" . mysql_real_escape_string($this->getUser_id()) . "'\n                WHERE id = " . mysql_real_escape_string($this->getId());
     $result = mysql_query($sql);
     //exit($sql);
     if (mysql_errno()) {
         LogSql::log(date("Y-m-d H:i:s") . " " . mysql_error() . ", " . __FILE__ . " [" . __LINE__ . "]");
         return false;
     } else {
         return true;
     }
 }
 public function update()
 {
     $sql = "UPDATE users SET\n                name = '" . mysql_real_escape_string($this->getName()) . "',\n                payment_order = '" . mysql_real_escape_string($this->getPayment_order()) . "',\n                image = '" . mysql_real_escape_string($this->getImage()) . "'\n                WHERE id = " . mysql_real_escape_string($this->getId());
     $result = mysql_query($sql);
     //exit($sql);
     if (mysql_errno()) {
         LogSql::log(date("Y-m-d H:i:s") . " " . mysql_error() . ", " . __FILE__ . " [" . __LINE__ . "]");
         return false;
     } else {
         return true;
     }
 }