I want to pass (1,2,3) this to an IN query of where clause. something like this.
$sql = $db->prepare("
SELECT
id, attribution,..........................
FROM
filterdaiict
WHERE Checkbox
IN (:checkbox)
HAVING
distance < :radius
ORDER BY
distance ASC
LIMIT
0, 50
");
$sql->bindParam(
':checkbox',
GetCheckboxValue ( $value['CHECKBOXLIST'] ),
PDO::PARAM_STR
);
where the function GetCheckboxValue ( $value['CHECKBOXLIST'] ) returns string like 1,2,3.
This code does not work. I do not know where the errors could be. Let me know. Thanks in advance.