phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/class.sotenant.php, 1.1.1.6


From: nomail
Subject: [Phpgroupware-cvs] property/class.sotenant.php, 1.1.1.6
Date: Sun, 9 May 2004 15:42:34 +0200

Update of /property
Modified Files:
        Branch: 
          class.sotenant.php

date: 2004/05/09 13:42:34;  author: sigurdne;  state: Exp;  lines: +9 -3

Log Message:
no message
=====================================================================
Index: property/class.sotenant.php
diff -u property/class.sotenant.php:1.1.1.5 property/class.sotenant.php:1.1.1.6
--- property/class.sotenant.php:1.1.1.5 Thu Apr 29 07:10:49 2004
+++ property/class.sotenant.php Sun May  9 13:42:34 2004
@@ -145,11 +145,17 @@
                        $tenant['last_name'] = 
$this->functions->db_addslashes($tenant['last_name']);
                        $tenant['first_name'] = 
$this->functions->db_addslashes($tenant['first_name']);
 
-                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_tenant 
(entry_date,last_name,first_name,contact_phone,category) "
-                               . "VALUES ('" . time() . "','" . 
$tenant['last_name'] . "','" . $tenant['first_name'] . "','" . 
$tenant['contact_phone'] . "','" . $tenant['cat_id'] . "')");
+                       $GLOBALS['phpgw']->db->begintrans();
+                       $tenant_id = 
$GLOBALS['phpgw']->db->genid('fm_tenant_tenant_id_seq');
 
-                       $receipt['tenant_id']= 
$this->db->get_last_insert_id('fm_tenant','tenant_id');
+                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_tenant 
(tenant_id,entry_date,last_name,first_name,contact_phone,category) "
+                               . "VALUES ($tenant_id,'" . time() . "','" . 
$tenant['last_name'] . "','" . $tenant['first_name'] . "','" . 
$tenant['contact_phone'] . "','" . $tenant['cat_id'] . "')");
+
+//                     $receipt['tenant_id']= 
$this->db->get_last_insert_id('fm_tenant','tenant_id');
+                       $receipt['tenant_id']= $tenant_id;
                        $receipt['message'][] = array('msg'=>lang('tenant %1 
has been saved',$receipt['tenant_id']));
+
+                       $GLOBALS['phpgw']->db->committrans();
                        return $receipt;
                }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]