Bug #75624 Escape function for AGAINST() queries
| Submitted: | 25 Jan 2015 16:51 | Modified: | 26 Jan 2015 10:11 |
|---|---|---|---|
| Reporter: | Kalle Nielsen | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: C API (client library) | Severity: | S4 (Feature request) |
| Version: | 5.6 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[26 Jan 2015 10:11]
MySQL Verification Team
Thank you for the bug report (feature request)
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: I would like to request a function to escape queries that is used in FULLTEXT searches, currently (from a PHP backend): $sql = '... AGAINST(\'+' . $input . '\') ...'; If $input have a void value like: $input = '--'; then the query would end up looking like: ... AGAINST('+--') ... Which is a syntax error, ofcourse. So I would like to request a C function to handle such escape sequences much like the escape string API that is exposed to client libraries used for language bindings. How to repeat: .