Error: Table 'mydb.ajax' doesn't exist
Error: Table 'mydb.ajax' doesn't exist
rks
Posts: 5Questions: 0Answers: 0
[DataTables Server Side PHP][1]
When I try to use the default DataTables server side script I get Table 'mydb.ajax' doesn't exist. Needless to say, no data is being returned from the db.
The code I've actually edited in that file is:
[code]/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array('person', 'object', 'location');
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "Key";
/* DB table to use */
$sTable = "ajax";
/* Database connection information */
$gaSql['user'] = "myuser";
$gaSql['password'] = "mypass";
$gaSql['db'] = "mydb";
$gaSql['server'] = "mysite.com";
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
* no need to edit below this line
*/[/code]
Yes...I've changed the vars to the real values for user, pass, db, and server. I'm calling this file via jquery like:
[code]$(".easy-table").dataTable(
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "phpprocess.php"
);[/code]
I'm using just what I see in that one example so maybe it's not all inclusive and I'm still missing something.
[1]: http://datatables.net/examples/data_sources/server_side.html
When I try to use the default DataTables server side script I get Table 'mydb.ajax' doesn't exist. Needless to say, no data is being returned from the db.
The code I've actually edited in that file is:
[code]/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array('person', 'object', 'location');
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "Key";
/* DB table to use */
$sTable = "ajax";
/* Database connection information */
$gaSql['user'] = "myuser";
$gaSql['password'] = "mypass";
$gaSql['db'] = "mydb";
$gaSql['server'] = "mysite.com";
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
* no need to edit below this line
*/[/code]
Yes...I've changed the vars to the real values for user, pass, db, and server. I'm calling this file via jquery like:
[code]$(".easy-table").dataTable(
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "phpprocess.php"
);[/code]
I'm using just what I see in that one example so maybe it's not all inclusive and I'm still missing something.
[1]: http://datatables.net/examples/data_sources/server_side.html
This discussion has been closed.
Replies
Allan