Changeset 6023 for trunk/prototype/services/PostgreSQL.php
- Timestamp:
- 04/25/12 10:33:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/services/PostgreSQL.php
r5998 r6023 45 45 } 46 46 47 public function update ( $uri, $data ){47 public function update ( $uri, $data, $criteria = false ){ 48 48 $map = Config::get($uri['concept'], 'PostgreSQL.mapping'); 49 return $this->execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).' WHERE id = \''. addslashes( $uri['id']) .'\''); 49 $criteria = ($criteria !== false) ? $this->parseCriteria ( $criteria , $map , ' WHERE '.$map['id'].' = \''.addslashes( $uri['id'] ).'\'') : ' WHERE '.$map['id'].' = \''.addslashes( $uri['id'] ).'\''; 50 return $this->execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).$criteria); 50 51 } 51 52
Note: See TracChangeset
for help on using the changeset viewer.