I was able to implement this tutorial in my test page: https://editor.datatables.net/examples/advanced/joinSelf.
My problem is I cannot implement this example in my other test page? https://datatables.net/examples/data_sources/server_side.html.
What seems to be the problem?
What's the difference between the configuration for dataTable editor and standard dataTable connection via Server-Side?
I am using SQL SERVER 2012, XAMPP, and SQLSRV for connection.
This is what I'm getting.
DataTables warning: table id=example - An error occurred while connecting to the database. The error reported by the server was: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.
It should work since I only need to populate these lines, right?
// SQL server connection information
$sql_details = array(
'user' => 'xx',
'pass' => 'xxxxx',
'db' => 'xxxxx',
'host' => 'xxxxx\SQLSERVER'
);
Similar to what I did to the dataTable Editor, I only populated this line.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Database user / pass
*/
$sql_details = array(
"type" => "Sqlserver", // Database type: "Mysql", "Postgres", "Sqlserver", "Sqlite" or "Oracle"
"user" => "xx", // Database user name
"pass" => "xxxxx", // Database password
"host" => "xxxxx\SQLSERVER", // Database host
"port" => "", // Database connection port (can be left empty for default)
"db" => "xxxxx", // Database name
"dsn" => "", // PHP DSN extra information. Set as `charset=utf8mb4` if you are using MySQL
"pdoAttr" => array() // PHP PDO attributes array. See the PHP documentation for all options
);
I also have the require( 'ssp.class.php' );
available in server-side scripts since what I downloaded was a full example.
May I ask for your help regarding this matter?