I have two tables in my hand with place names. now I need to compare the place names of the two tables, see which are the same but not exactly the same (for example, in Table a, Beijing is written in Table B), and in Table a, the pid & gt; 0 and city0 I wrote a statement $ SQL & quot; select * frombyzk_areasaleftjoinbyzk_fuiou_citybona.namelike & #39; B. cname % & #39; wherea. pid & gt; 0anda. city0 & quot; but it seems wrong !!! Great help database mysqlphpsql statements
I have two tables in my hand with place names. now I need to compare the place names of the two tables, see which are the same but not exactly the same (for example, in Table a, Beijing is written in Table B), and in Table a, the pid> 0 and city = 0 must be met.
I wrote a statement myself.
$ SQL = "select * from byzk_areas a left join byzk_fuiou_city B on a. name like 'B. cname %' where a. pid> 0 and a. city = 0 ";
But it seems wrong !!! Thank you!