2017-10-12 114 views

回答

0

這是你的解決方案

$array = json_decode('["art","nature"]',true); 
$condition = ''; 
foreach($array as $r) $condition .= 'medium LIKE "%'.$r.'%" OR '; 
$condition = rtrim($condition,' OR '); 
echo $condition; 
echo 'SELECT * FROM table WHERE '.$condition; 
+0

我需要一個答案MYSQL查詢不在php – Jabaa

+0

先生$條件有你在哪裏查詢.. – GYaN