[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.74.2.10,
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.74.2.10,1.74.2.11 |
Date: |
Mon, 02 Sep 2002 18:04:09 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv999
Modified Files:
Tag: Version-0_9_14-branch
class.categories.inc.php
Log Message:
update add function to return the id
Index: class.categories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.categories.inc.php,v
retrieving revision 1.74.2.10
retrieving revision 1.74.2.11
diff -C2 -r1.74.2.10 -r1.74.2.11
*** class.categories.inc.php 3 Jul 2002 00:56:13 -0000 1.74.2.10
--- class.categories.inc.php 2 Sep 2002 22:04:07 -0000 1.74.2.11
***************
*** 494,505 ****
. "','" . $cat_values['main'] . "','" .
$cat_values['level'] . "')",__LINE__,__FILE__);
if (!$cat_values['parent'] || $cat_values['parent'] ==
0)
{
- $this->db->query("SELECT MAX(cat_id) FROM
phpgw_categories",__LINE__,__FILE__);
- $this->db->next_record();
- $max = $this->db->f(0);
$this->db->query("UPDATE phpgw_categories SET
cat_main='" . $max . "' WHERE cat_id='"
! . $max . "'",__LINE__,__FILE__);
}
}
--- 494,505 ----
. "','" . $cat_values['main'] . "','" .
$cat_values['level'] . "')",__LINE__,__FILE__);
+ $max =
$this->db->get_last_insert_id('phpgw_categories','cat_id');
+
if (!$cat_values['parent'] || $cat_values['parent'] ==
0)
{
$this->db->query("UPDATE phpgw_categories SET
cat_main='" . $max . "' WHERE cat_id='"
! . $max .
"'",__LINE__,__FILE__);
}
+ return $max;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.categories.inc.php,1.74.2.10,1.74.2.11,
Bettina Gille <address@hidden> <=