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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -