|
|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-03 16:46 UTC] [email protected]
-Summary: MySQLi MUST provide an escape function for
use in MATCH...AGAINST
+Summary: MySQLi should provide an escape function for
use in MATCH...AGAINST
-Type: Bug
+Type: Feature/Change Request
-PHP Version: 5.6.32
+PHP Version: 7.1.12
[2018-01-03 16:46 UTC] spam2 at rhsoft dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 10 19:00:01 2025 UTC |
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant
Description: ------------ Say you have a string $someword and you need to use it within a query like: "SELECT whatever where MATCH(whatever) AGAINST('+$someword +someotherword' IN BOOLEAN MODE)" You need to properly escape certain characters in $someword so that you don't get syntax errors in the boolean search expression. I know I'm being sloppy at defining what needs to be done. Actually I'm pretty sure there are different kinds of escaping you would need for different use cases, but it's certainly possible to define them unambiguously. Expected: there should be methods in the MySQLi class for this. Observed: you have to write your own code, and you'll almost certainly get it wrong; or you'll have to find some 3rd party libraries, which is pathetic.