2023-01-24 19:00:39 +01:00

41 lines
833 B
PHP

<?php
class report extends _publication {
protected $type = 5;
// each type has its own master record
// THIS ONLY ADDS article (master of publication)
protected function _addMaster() {
if (!$this->_isPublisher()) {
$this->_addPublisher();
}
try {
$stmt = $this->PDO->prepare("INSERT INTO p_report (id_inst) VALUES (:id_publisher)");
$stmt->execute(array('id_publisher' => $this->publisher_id));
$master_id = $this->PDO->lastInsertId();
return $master_id;
}
catch (exception $ex) {
common::except ('Err: ' .$ex .' in ' .__DIR__ .'/' .__FILE__ .':' .__LINE__);
}
return false;
}
}