Unable to use get_page_by_title() more than once per page?

get_page_by_title returns an id not content. here is an example of what I use to get content from a certain page id.

call the function

$page_id = get_page_by_title('title');
$excerpt =  get_excerpt_by_id($page_id);

in functions.php

function get_excerpt_by_id($post_id) {
   global $wpdb;
   $query = "SELECT post_content FROM $wpdb->posts WHERE ID = $post_id LIMIT 1";
   $result = $wpdb->get_results($query, ARRAY_A);
   return $result[0]['post_content'];
}