I have 2 tables both the table have exact same field names and datatype.
ISSUES: 1) I'm unable to receive data from both columns 2) I also need to count phone no in both table
The field names are member_id, name , phone
BELOW IS LARAVEL QUERY BUILDER
$member_info = DB::table('member')->select('member_temp.*','member.*')->where(
array(
)
);
$member_info = $member_info->join('member_temp','member_temp.phone', '=', 'member.phone')
->get()->toArray();
//RAW MYSQL QUERY
select *
from `member`
inner join `member_temp`
on `member_temp`.`phone` = `member`.`phone`
THANKS IN ADVANCE
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire