I'm trying to create a filter system that allows users to block out stories containing certain tags. I've sorta hit a roadblock when trying to figure out how to pass what is essentially an unknowable number of parameters.
This is my latest attempt, with no luck.
$filters = array("%#nsfw#%", "%#gore#%");
$sCount = "ss";
$query = $conn->prepare("SELECT * FROM tales WHERE tags NOT LIKE ? and tags NOT LIKE ?");
$query->bind_param($sCount, $filters);
$query->execute();
$rows = $query->get_result()->fetch_all(MYSQLI_ASSOC);
$query->close();
Is there any way at all to make this work; where "nsfw" and "gore" (and any other filters) could be passed as separate parameters?