0

I have small script that is making select to MS Asscess db, query looks like this

 $sql  = "SELECT * FROM Employee WHERE EmployeeName LIKE %$user_full_name%";

where $user_full_name have special characters like óńćżźśąę, if those chars are replaced by _ query will have result but they are not 100% accurate, so i wanted to use mb_convert_encoding to encode my select query to that of ms access but all known encodings don't work, is there a way to make ms access understand it, or where i can get info in what encoding is my ms Access?

Thamilhan
  • 13,040
  • 5
  • 37
  • 59
Viszman
  • 1,378
  • 1
  • 17
  • 47
  • Are those characters stored in your access DB as that? If so what encoding are you using? Sounds like via this thread, http://stackoverflow.com/questions/5222705/how-to-convert-ms-access-database-encoding-to-utf-8, that access doesnt support utf8.. Oh.. actually reading more that was access 2003 so maybe you have updated... – chris85 Nov 03 '15 at 12:54
  • i have ms access 2010 driver installed, and i don't know what `access` encoding have i'm using utf-8 in my app – Viszman Nov 03 '15 at 13:09
  • I'm not sure either but if you have 2 different encodings that could be your issue. I'd start there. – chris85 Nov 03 '15 at 13:28
  • if i would know encoding in Access this question would be meaningless – Viszman Nov 03 '15 at 13:41

1 Answers1

0

Try this:

$sql  = "SELECT * FROM Employee WHERE EmployeeName LIKE '*$user_full_name*'";

I would also do this:

$sql  = "SELECT * FROM Employee WHERE EmployeeName LIKE '*".$user_full_name."*'";

but that is just personal preference.

SunKnight0
  • 3,331
  • 1
  • 10
  • 8