Get value form wordpress database

There’s a wpdb class in WordPress for you to be able to read/write DB.

To get variable from table, use $wpdb->get_var function. This way:

//set current page ID or define ID in another way - depends on your code
$my_page_id = get_the_ID(); 
global $wpdb;
$ListingID = $wpdb->get_var( "SELECT listing_id FROM ".$wpdb->prefix."fsrep_listings WHERE ID = " . $my_page_id );
echo "<p>Listing id is {$ListingID}</p>";

In the code i presume, that the table has ID column keeping page/post/custom_post_type ID value to match with page/post_custom_post_type.