php/Classes/Author.php
/**
	 * updates this author in mySQL
	 *
	 * @param \PDO $pdo PDO connection object
	 * @throws \PDOException when mySQL related errors occur
	 * @throws \TypeError if $pdo  is not a PDO connection object
	 */
updates this author in mySQL
@param \PDO $pdo PDO connection object
@throws \PDOException when mySQL related errors occur
@throws \TypeError if $pdo  is not a PDO connection object
updates this author in mySQL @param \ PDO $pdo PDO connection object @throws \ PDOException when mySQL related errors occur @throws \ TypeError if $pdo is not a PDO connection object
public function update(\PDO $pdo) : void {
		$query = "UPDATE author SET authorId = :authorId, authorActivationToken = :authorActivationToken, authorAvatarUrl = :authorAvatarUrl, authorEmail = :authorEmail, authorHash = :authorHash, authorUsername = :authorUsername WHERE authorId = :authorId";
		$statement = $pdo->prepare($query);
		$parameters = ["authorId" => $this->authorId->getBytes(), "authorActivationToken" => $this->authorActivationToken, "authorAvatarUrl" => $this->authorAvatarUrl, "authorEmail"=> $this->authorEmail, "authorHash"=>$this->authorHash, "authorUsername"=>$this->authorUsername];
		$statement->execute($parameters);
	}
public function update ( \ PDO $ pdo ) : void { $ query = " UPDATE author SET authorId = :authorId, authorActivationToken = :authorActivationToken, authorAvatarUrl = :authorAvatarUrl, authorEmail = :authorEmail, authorHash = :authorHash, authorUsername = :authorUsername WHERE authorId = :authorId " ; $ statement = $ pdo -> prepare ( $ query ) ; $ parameters = [ " authorId " => $ this -> authorId -> getBytes ( ) , " authorActivationToken " => $ this -> authorActivationToken , " authorAvatarUrl " => $ this -> authorAvatarUrl , " authorEmail " => $ this -> authorEmail , " authorHash " => $ this -> authorHash , " authorUsername " => $ this -> authorUsername ] ; $ statement -> execute ( $ parameters ) ; }
updates this author in mySQL
 @param \PDO $pdo PDO connection object
 @throws \PDOException when mySQL related errors occur
 @throws \TypeError if $pdo  is not a PDO connection object
updates this author in mySQL @param \ PDO $pdo PDO connection object @throws \ PDOException when mySQL related errors occur @throws \ TypeError if $pdo is not a PDO connection object
// create query template // bind the member variables to the place holders in the template