modified the sql code in searching train schedule