$query = "SELECT * FROM `mytable` WHERE `file` REGEXP '[:val-9]'";
$stmt = $dbh->prepare($query);
$stmt->bindValue(':val', '1'); //I have also tried 1 without quotes
$stmt->execute();
Throws this error:
Syntax error or access violation: 1139 Got error ‘invalid character
range’ from regexp
Is it possible to do this..
Placeholders can only be used where a value can appear, not embedded in strings. Try: