大家好,我有一个PHP数组,我想在SQL中使用LEFT JOIN(或内部选择)中的表,请任何人都可以为我解决这个问题..
$array = (
array(
'ID' => 123
'value' => 'value1'
),array(
'ID' => 456
'value' => 'value2'
),array(
'ID' => 789
'value' => 'value3'
)
)
$this->db->query("SELECT p.*,custome.value
FROM `cm_posts` p
LEFT JOIN ( `SOMTHING TO ADD HERE PHP ARRAY` ) custome on (p.ID = custome.ID) ")