SELECT a.city,b.startip,b.endip FROM cityinfo a JOIN t_ip b ON b.cheng LIKE CONCAT("%" ,a.city ,"%") ORDER BY a.city
1.cityinfo 只有city字段, sql
2.t_ip 中5個字段 id int ,sheng 省份,city 城市 ,startip 開始ip ,endip 結束ip code