[Cs-webapplibs-commits] SF.net SVN: cs-webapplibs:[207] trunk/0.4/abstract/cs_singleTableHandler. a
Status: Beta
Brought to you by:
crazedsanity
From: <cra...@us...> - 2011-02-07 19:37:18
|
Revision: 207 http://cs-webapplibs.svn.sourceforge.net/cs-webapplibs/?rev=207&view=rev Author: crazedsanity Date: 2011-02-07 19:37:12 +0000 (Mon, 07 Feb 2011) Log Message: ----------- Minor change to keep values deemed as empty from being removed from the SQL. /abstract/cs_singleTableHandler.abstract.class.php: * create_record(): -- ARG CHANGE: NEW ARG: #2 ($removeEmptyVals=TRUE) -- pass new arg to cs_globalFunctions::string_from_array() Modified Paths: -------------- trunk/0.4/abstract/cs_singleTableHandler.abstract.class.php Modified: trunk/0.4/abstract/cs_singleTableHandler.abstract.class.php =================================================================== --- trunk/0.4/abstract/cs_singleTableHandler.abstract.class.php 2011-02-01 03:58:32 UTC (rev 206) +++ trunk/0.4/abstract/cs_singleTableHandler.abstract.class.php 2011-02-07 19:37:12 UTC (rev 207) @@ -81,10 +81,10 @@ * @RETURN (int) SUCCESS: the (int) is the last inserted ID. * @EXCEPTION FAIL: exception indicates the error. */ - public function create_record(array $data) { + public function create_record(array $data, $removeEmptyVals=TRUE) { if(is_array($data) && count($data)) { $sql = 'INSERT INTO '. $this->tableName .' ' - . $this->gfObj->string_from_array($data, 'insert', null, $this->cleanStringArr, true); + . $this->gfObj->string_from_array($data, 'insert', null, $this->cleanStringArr, $removeEmptyVals); try { $newId = $this->dbObj->run_insert($sql, $this->seqName); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |