Search inputs and SQL statements validated