/** * * @param $postID * @return object PhotoQPublishedPhoto */ function &getPublishedPhoto($postID) { $result = $this->_wpdb->get_row("\n\t\t\tSELECT post_title, meta_value FROM {$this->POSTS_TABLE}, {$this->POSTMETA_TABLE} \n\t\t\tWHERE {$this->POSTS_TABLE}.ID = '{$postID}' AND {$this->POSTS_TABLE}.ID = {$this->POSTMETA_TABLE}.post_id AND {$this->POSTMETA_TABLE}.meta_key = 'photoQPath'"); if (is_null($result)) { $this->_errStack->push(PHOTOQ_POST_NOT_FOUND, 'error', array('id' => $postID)); return NULL; } return new PhotoQPublishedPhoto($postID, $result->post_title, '', '', $result->meta_value, '', PhotoQHelper::getArrayOfTagNames($postID)); }