我想排除这些名称为的专辑:
$ban_album_names = array('Wall', 'Profile', 'Cover', 'Instagram');
我该如何正确书写,
SELECT * FROM albums WHERE name NOT IN ???
如何使它在数组中显示,以及名称是否匹配!=该行
试试这个:
$sql = "SELECT * FROM albums WHERE name NOT IN ( '" . implode( "', '" , $ban_album_names ) . "' )";