fixed cmd_search: used wrong MYSQL_RES variable