removed console.log(data)
defined select_where_plain function
added  as parameter to select_where function