/** * Update one baptismRegistry in the database * * @author Jonathan Sandoval <*****@*****.**> * @param Baptism $baptismRegistry The baptismRegistry to update * @return boolean if was possible to update */ static function updateBaptismRegistry($baptismRegistry = null) { if ($baptismRegistry === null) { return false; } $tableBaptismRegistry = DatabaseManager::getNameTable('TABLE_BAPTISM_REGISTRY'); $id = $baptismRegistry->getId(); $book = $baptismRegistry->getBook(); $page = $baptismRegistry->getPage(); $number = $baptismRegistry->getNumber(); $query = "UPDATE {$tableBaptismRegistry}\r\n SET book = '{$book}', \r\n page = '{$page}', \r\n number = '{$number}'\r\n WHERE {$tableBaptismRegistry}.id = {$id}"; return DatabaseManager::singleAffectedRow($query); }