[tpln~subversion:33] - add primary key
- From: laurent_h@kenai.com
- To: commits@tpln.kenai.com
- Subject: [tpln~subversion:33] - add primary key
- Date: Tue, 9 Mar 2010 09:23:17 +0000
Project: tpln
Repository: subversion
Revision: 33
Author: laurent_h
Date: 2010-03-09 09:23:14 UTC
Link:
Log Message:
------------
- add primary key
Revisions:
----------
33
Modified Paths:
---------------
TPLN/plugin/db/db.class.php
Diffs:
------
Index: TPLN/plugin/db/db.class.php
===================================================================
--- TPLN/plugin/db/db.class.php (revision 32)
+++ TPLN/plugin/db/db.class.php (revision 33)
@@ -385,12 +385,13 @@
* @param array $arr
* @param array $exlude_fields
* @param bool $return_last_id
+ * @param string $pk_key_name default ID
*
* @return boolean
*
* @since 2.8
* @author H2LSOFT */
- public function dbInsert($table, $arr, $exlude_fields=array(),
$return_last_id='')
+ public function dbInsert($table, $arr, $exlude_fields=array(),
$return_last_id=false, $pk_key_name='ID')
{
// protection
$arr = $this->dbProtection($arr);
@@ -445,9 +446,9 @@
$b = $this->doQuery($sql);
// return last insert id
- if($return_last_id != '')
+ if(!$return_last_id)
{
- return $this->dbGetMaxId($table, $return_last_id);
+ return $this->dbGetMaxId($table, $pk_key_name);
}
|
[tpln~subversion:33] - add primary key |
laurent_h | 03/09/2010 |





