页面上有五个查询条件,我想实现他们可以单查也可以组合查询请问
这个sql怎么写啊,我是这样写的但是不对
String sql = "Select station,city,stationlevel,city,stationlevel,citylevel,citypy From b_train_station where station ='+station+ and city ='+city+' and stationlevel='+stationlevel+' and citylevel='+citylevel+' and citypy='+citypy+'";
------解决方案--------------------
String sql = "Select station,city,stationlevel,city,stationlevel,citylevel,citypy From b_train_station where station ='" + station + "' and city ='"+ city + "' and stationlevel='" + stationlevel + "' and citylevel='" + citylevel +"' and citypy='"+ citypy + "'";