function testgetPersonDatabaseSomDat() { $hp = new PersonParser(); $parseString = "2459201|Petter, Svein Hansen|En gate. 2 A|3. b|4 a|4323|N|348|lol|112|05.02.2008|22.09.1993|19.09.1949"; $paa = $hp->getArray($parseString); $pa = $hp->getDatabaseSomDat($paa); $this->assertEquals($parseString, $pa); }
public function overskriv($verdier, $klubbId) { if (DatReferanseDatabase::hentReferanse(PersonParser::getDatabaseSomDat($verdier), $this->database) != null) { DatReferanseDatabase::slettReferanse(PersonParser::getDatabaseSomDat($verdier), $this->database); } $verdier['manueltEndretAv'] = ""; $verdier['manueltEndretDato'] = ""; $hvor = $this->database->quoteInto('personId = ?', $verdier['personId']) . $this->database->quoteInto('AND raseId = ?', $klubbId); return $this->database->update('nkk_person', $verdier, $hvor); }