if statement - Selecting data from 2 different tables depending upon the conditions; mySQL -
i have 2 tables; table , table b table has 3 columns; a, b, c table b has 2 columns; d , e i want select if a.b not null select a.b else if a.b null select b.d any please i made example, if required a.a , a.c unique ids. give try! // select data database select * table_a if((a.a != "") || (a.a != null)){ // select d table b } else { // echo records column b }