setFromRow($rs); return $t;'),$params ) ); } //-------------------------------------------------------------------- /** * returns array of PublisherValue */ function getAllPublisherValue( $orderBy ) { $params = array(); $sql = PublisherSelectPublisherValue ; if(!empty($orderBy)){ $sql = $sql . " order by " . $orderBy; } return pgdb_runSqlP($sql, create_function('$rs', '$t = new PublisherValue(); $t->setFromRow($rs); return $t;'),$params ); } //-------------------------------------------------------------------- function add( $value ) { $sql = "insert into Publisher ( " . "publisherId " . ",name " . " ) values ( " . "nextval('Publisher_publisherId_seq') " . ",? " . ")"; $params = array(); $params[] = $value->getName(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function update( $value ) { $sql = "update Publisher set " . "name = ? " . " where " . "publisherId = ? " . ""; $params = array(); $params[] = $value->getName(); $params[] = $value->getPublisherId(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function delete( $publisherId ) { $sql = "delete from Publisher where " . "publisherId = ? " . ""; $params = array(); $params[] = $publisherId; pgdb_runSqlP($sql,null,$params); } } // // ================================================================== // // WARNING : Do not edit this file by hand. This file was created // by SoProMach. Edit the definition files and re-generate to make // modifications. Making modifications to this file directly will // result in loss of work when the file is re-generated. // // ================================================================== ?>