How to get the results from two table based on mobile number in codeigniter


Here i have two tables i want write a select results from that two tables based on mobile number.

First Table




staff_id firstName Mobile userType
1 Soupranjali 9986125566 Teacher   2 Sujata 8553880306 Teacher  

Second Table




student_id first_Name fatherMobile user_type
1 janarthan 8553880306 Student   2 Santanu 8277904354 Student  

here 8553880306 both table available so i need output like this


Expected Results


{   "status": "Success"   "Profile": [   {   "staff_id": "2