Fix mysqli

This commit is contained in:
Laurent Destailleur 2024-03-29 17:09:36 +01:00
parent 67b12fc438
commit c87f24e3f4

View file

@ -518,6 +518,7 @@ class DoliDBMysqli extends DoliDB
*/
public function escapeforlike($stringtoencode)
{
// We must first replace the \ char into \\, then we can replace _ and % into \_ and \%
return str_replace(array('\\', '_', '%'), array('\\\\', '\_', '\%'), (string) $stringtoencode);
}