Skip to content

Instantly share code, notes, and snippets.

@timgavin
Created April 22, 2015 12:22
Show Gist options
  • Save timgavin/ababd47aca2b48347071 to your computer and use it in GitHub Desktop.
Save timgavin/ababd47aca2b48347071 to your computer and use it in GitHub Desktop.
Set Encoding in ezSQL
// When creating a new connection just set the fifth parameter to the encoding you desire
// and ezDB will run a 'SET NAMES' query with your preferred encoding.
$db = new ezSQL_mysqli(
'username',
'password',
'database',
'localhost',
'UTF-8'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment