trouble with query to fetch next and previous posts

Try:

$arrPosts = $wpdb->get_results($sql);

That said, note that there also is an API to get these two. See in particular:

get_next_post()
get_previous_post()

tech