MySql View with joined tables

MySql View with joined tables

Mr_KoRn3Mr_KoRn3 Posts: 2Questions: 0Answers: 0
edited November 2013 in DataTables 1.9
Hello.

I'm using the server-side option to get data from a MySql view. This view has a SELECT joining two tables. When some column has a strange caracter like "ñ" or accent mark like "ó", it doesn't work and I get this error: "Uncaught TypeError: Cannot read property 'sError' of null ". If the SELECT doesn't return a result with this type of caracters, it works fine. This example fails:

SELECT g.id, c.country
FROM gigs as 'g' join countries as 'c' on g.idCountry = c.id

ID | COUNTRY
1 | España
2 | Perú

I am spanish and I have to use this type of caracters. Do you have any solution?

Thanks.

Replies

  • Mr_KoRn3Mr_KoRn3 Posts: 2Questions: 0Answers: 0
    I've solved it!

    In the "server_processing.php" file, I have replaced:

    $output['aaData'][] = $row;

    by this:

    $output['aaData'][] = array_map('utf8_encode', $row);
This discussion has been closed.