[Cs-content-commits] SF.net SVN: cs-content:[407] trunk/1.0/cs_phpDB.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-07-20 05:26:04
|
Revision: 407
http://cs-content.svn.sourceforge.net/cs-content/?rev=407&view=rev
Author: crazedsanity
Date: 2009-07-20 05:26:02 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
Fix run_insert() for pgsql so the last ID can be found
/cs_phpDB.class.php:
* run_insert():
-- ARG CHANGE: NEW ARG: $sequence=null
-- add sequence so lastID() works for pgsql
Modified Paths:
--------------
trunk/1.0/cs_phpDB.class.php
Modified: trunk/1.0/cs_phpDB.class.php
===================================================================
--- trunk/1.0/cs_phpDB.class.php 2009-07-15 16:14:38 UTC (rev 406)
+++ trunk/1.0/cs_phpDB.class.php 2009-07-20 05:26:02 UTC (rev 407)
@@ -133,13 +133,13 @@
/**
* Handles performing the insert statement & returning the last inserted ID.
*/
- public function run_insert($sql) {
+ public function run_insert($sql, $sequence='null') {
$this->exec($sql);
if($this->numAffected() == 1 && !strlen($this->errorMsg())) {
//retrieve the ID just created.
- $retval = $this->lastID();
+ $retval = $this->lastID($sequence);
}
else {
//something broke...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|