SQLite: execute case-sensitive LIKE query on a specific query
Why not go the simple way of using
PRAGMA case_sensitive_like = true/false;
before and after each query you want to be case sensitve? But beware- case sensitivity does only work for ASCII characters, not Unicode which makes SQlite not fully UC-compliant at this time.
Alternatively, SQlite allows applications to implement the REGEXP operator which might help according to www.sqlite.org/lang_expr.html.
Try:
SELECT id, summary, status FROM Tickets WHERE summary GLOB \"*OPS*\";
there is no space between *
and OPS
.
I think you may need to do a seperate check in your php code on returned value to see if they match your case-sensitive data.
$rs = mysql_query("Select * from tbl where myfield like '%$Value%'");while($row == mysql_fetch_assoc($rs)){ if (strpos($row['myfield'],$Value) !== false) { $Matches[] = $row; } } print_R($Matches);