setFromRow($rs); return $t;'),$params ) ); } //-------------------------------------------------------------------- /** * returns array of StoreBookValue */ function getAllStoreBookValue( $orderBy ) { $params = array(); $sql = StoreBookSelectStoreBookValue ; if(!empty($orderBy)){ $sql = $sql . " order by " . $orderBy; } return pgdb_runSqlP($sql, create_function('$rs', '$t = new StoreBookValue(); $t->setFromRow($rs); return $t;'),$params ); } //-------------------------------------------------------------------- function add( $value ) { $sql = "insert into StoreBook ( " . "storeId " . ",bookId " . ",quantity " . " ) values ( " . "? " . ",? " . ",? " . ")"; $params = array(); $params[] = $value->getStoreId(); $params[] = $value->getBookId(); $params[] = $value->getQuantity(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function update( $value ) { $sql = "update StoreBook set " . "quantity = ? " . " where " . "storeId = ? " . " and bookId = ? " . ""; $params = array(); $params[] = $value->getQuantity(); $params[] = $value->getStoreId(); $params[] = $value->getBookId(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function delete( $storeId ,$bookId ) { $sql = "delete from StoreBook where " . "storeId = ? " . " and bookId = ? " . ""; $params = array(); $params[] = $storeId; $params[] = $bookId; pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function getStoreBookWithNamesValue( $storeId ,$bookId ) { $params = array(); $params[] = $storeId; $params[] = $bookId; $sql = StoreBookSelectStoreBookWithNamesValue . " and " . " StoreBook1.storeId = ? and StoreBook1.bookId = ? " ; return pgdb_firstRow( pgdb_runSqlP($sql, create_function('$rs', '$t = new StoreBookWithNamesValue(); $t->setFromRow($rs); return $t;'),$params ) ); } //-------------------------------------------------------------------- /** * returns array of StoreBookWithNamesValue */ function getAllStoreBookWithNamesValue( $orderBy ) { $params = array(); $sql = StoreBookSelectStoreBookWithNamesValue ; if(!empty($orderBy)){ $sql = $sql . " order by " . $orderBy; } return pgdb_runSqlP($sql, create_function('$rs', '$t = new StoreBookWithNamesValue(); $t->setFromRow($rs); return $t;'),$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. // // ================================================================== ?>