src/libraries/adapters/DatabaseMySql.php
/**
    * Inserts a new version of photo with $id and $versions
    * TODO this should be in a json field in the photo table
    *
    * @param string $id ID of the photo.
    * @param array $versions Versions to the photo be inserted
    * @return array
    */
Inserts a new version of photo with $id and $versions
TODO this should be in a json field in the photo table

@param string $id ID of the photo.
@param array $versions Versions to the photo be inserted
@return array
Inserts a new version of photo with $id and $versions TODO this should be in a json field in the photo table @param string $id ID of the photo . @param array $versions Versions to the photo be inserted @return array
private function postVersions($id, $versions)
  {
    foreach($versions as $key => $value)
    {
      $result = $this->db->execute("REPLACE INTO {$this->mySqlTablePrefix}photoVersion (`id`, `owner`, `key`, `path`) VALUES(:id, :owner, :key, :value)",
        array(':id' => $id, ':owner' => $this->owner, ':key' => $key, ':value' => $value));
    }
    return ($result != 1);
  }
private function postVersions ( $ id , $ versions ) { foreach ( $ versions as $ key => $ value ) { $ result = $ this -> db -> execute ( " REPLACE INTO  { $ this -> mySqlTablePrefix } photoVersion (`id`, `owner`, `key`, `path`) VALUES(:id, :owner, :key, :value) " , array ( ':id' => $ id , ':owner' => $ this -> owner , ':key' => $ key , ':value' => $ value ) ) ; } return ( $ result != 1 ) ; }
Inserts a new version of photo with $id and $versions
 TODO this should be in a json field in the photo table
Inserts a new version of photo with $id and $versions TODO this should be in a json field in the photo table
// TODO this is gonna fail if we already have the version -- hfiguiere // Possibly use REPLACE INTO? -- jmathai // TODO, what type of return value should we have here -- jmathai