mysql - Multiple table search then show null if not found -
i using mysql. have 2 tables:
kecamatan id | name | slug | kota_id 1 kec1 kec1 1 2 kec2 kec2 1 kota id | namek | slugk 1 kot1 kot1 2 kot2 kot2
i want search in 2 tables 1 query; how result this?
let's search slug
containing "kot1"
; result be:
id | name | slug | namek | slugk 1 null null kot1 kot1
then when search slug
containing "kec2"
, result be:
id | name | slug | namek | slugk 1 kec2 kec2 null null
Comments
Post a Comment