202104-27 Python使用sql语句对mysql数据库多条件模糊查询的思路详解 deffind_worldByName(c_name,continent):print(c_name)print(continent)sql="SELECT*FROMworldWHERE1=1"if(c_name!=None):sql=sql+"AND(c_nameLIKE'%"+c_name+"%')"if(continent!=None):sql=sql+"AND(continentLIKE'%"+continent+"%')"sql=sql+"ANDdt=(SELECTdtFROMworldorderbydtdesclimit1)orderbyconfirmdesc"#"ANDcontinentLIKE... 继续阅读 >