search using get_var for custom table

Hi, I have this script for which I am simply trying to display results from a custom table using custom search form.

the code:

global $wpdb;

if(isset($_GET['search-custom-table']) && $_GET['search-custom-table'] != '') {
$user_search = esc_attr($_GET['search-custom-table']);
$address_table = $wpdb->prefix . "address_table";
$myrows = $wpdb->get_var( 'SELECT city FROM ' . $address_table );
global $myrows;



<form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
<input type="text" name="search-custom-table" id="search-custom-table" />

<input type="submit" class="" value="Search" />

This is giving a result of NULL.

I have searched codex, stackoverflow, and googled in general, however, those options haven’t helped to solve this.

Thanks ~