I'm running the following query using MySQL workbench and I'm getting the exact results from the database :
SELECT *
FROM ODB_RG
WHERE fullAddressV1 = 'רמת גן חרושת 1'
OR fullAddressV2 = 'רמת גן חרושת 1'
OR fullAddressV3 = 'רמת גן חרושת 1'
OR fullAddressV4 = 'רמת גן חרושת 1'
On the other hand, running the following php code does, that actually generated an equivalent query to the one mentioned above,does not return any record :
$fullAddress = "1 רמת גן חרושת";
$stmt = $con->prepare("SELECT * FROM ODB_RG WHERE fullAddressV1 = :address1 "
. "OR fullAddressV2 = :address2 OR fullAddressV3 = :address3 "
. "OR fullAddressV4 = :address4");
$stmt->bindParam(':address1',$fullAddress);
$stmt->bindParam(':address2',$fullAddress);
$stmt->bindParam(':address3',$fullAddress);
$stmt->bindParam(':address4',$fullAddress);
$status = $stmt->execute();
The only reasonable cause that might lead to the difference between the solution is the Hebrew string that is passed as a parameter.
Any of you have any idea what should be done in order to fix it ? Thanks in advance !
EDIT : This is the collation i'm using for the relevant table:
engine=MyISAM charset=UTF8 COLLATE = utf8_general_ci;