我正在使用 Joomla 2.5。我正在使用 MYSQL 数据库。我有一个job_field
包含以下列的表格:
cat_id | location_id
-----------------------
1,4 | 66,70
我需要将它与另一个表进行比较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
我希望输出将第一个表中cat_id
的列与第二个表列和.location_id
job_details
job_value
cat_id
location_id
它将检查第一个表 ( job_details
) 中的每个值,即location_id
列值 (66, 70) 与第二个表 ( job_value
)location_id
列分开。我将得到输出数组
Array (
1 70 Atul
4 70,80 Amit
4 80,66 Amol
1 66 Pritam
)