/** * inserts data into the biblio_copy table * and create barcodes for the insterted titles * barcode is a 12 char code based on the book id * @param $data * @param $lastInsertID the last inserted id from the biblio table * @return nothing */ function insertBiblioCopy($data, $lastInsertID) { $copy = new BiblioCopy(); $copy->setBibid($lastInsertID); $copy->setCreateDt(date("Y-m-d H:i:s")); $copy->setBarcodeNmbr($data[0]); $copy->setStatusCd($data[3]); $copy->setStatusBeginDt(date("Y-m-d H:i:s")); $copy->setBasketNumber($data[5]); $copy->setCopyDesc($data[6]); $bibcopyQ = new BiblioCopyQuery(); if ($bibcopyQ->insert($copy) == false) { return $bibcopyQ->getError(); } return null; }