Convert query to D7 for db_query_range
As far as I can tell your code is fine except for a small syntax error; you're missing a closing parenthesis on the end of the statement. It should be:

$query = db_query_range('SELECT z.latitude, z.longitude FROM {zipcodes} z WHERE z.city = UPPER(:city)', 0, 1, array(':city' =&gt;$search_term));


It's often handy to split the arguments out into a separate array so this sort of thing is easily avoidable:

$args = array(':city' =&gt; $search_term);
$query = db_query_range('SELECT z.latitude, z.longitude FROM {zipcodes} z WHERE z.city = UPPER(:city)', 0, 1, $args);