DataTables / DataTablesSrc

DataTables source repository
https://datatables.net
MIT License
587 stars 422 forks source link

Ability to set database charset in ssp_class #254

Closed emmanero90 closed 6 months ago

emmanero90 commented 6 months ago

In the function function sql_connect ( $sql_details ) under ssp_class, the script will not work for non utf8 character. I have to solve this by adding charset=utf8mb4 to the $db definition "mysql:host={$sql_details['host']};dbname={$sql_details['db']};charset=utf8mb4"

AllanJard commented 6 months ago

In the SQL connection details array that is passed to SSP::simple() (second parameter) you can specify a character set as shown here.