If i have a table
parent_table {ID,code} 
2 colums. ID - primary key
childe_table {ID,parent_table_ID, Name} 
3 columns. parent_table_id is foreign key
I'm trying to create query to do this:
if(parent_table.code == 'x'){
    child_table.Name == 'value'
}
I know that I should use joins to do this. Could someone show me an example?
 
     
    