I am Using Joomla 2.5. I am using MYSQL database.
I have a table job_field
with the following columns:
cat_id | location_id
-----------------------
1,4 | 66,70
I need to compare it with another table job_value
cat_id | location_id | name
--------------------------------
1 | 70 | Atul
4 | 70,80 | Amit
4 | 80,66 | Amol
1 | 66 | Pritam
3 | 70 | Rahul
2 | 66,90 | Ajit
1 | 74 | Raju
4 | 65,22 | Manoj
I want output to compare cat_id
and location_id
columns from first table job_details
with second table job_value
columns cat_id
and location_id
.
And it will check each value from 1st table (job_details
) that is location_id
column value (66, 70) separately with 2nd table (job_value
) location_id
column. I will get output array as
Array (
1 70 Atul
4 70,80 Amit
4 80,66 Amol
1 66 Pritam
)