Php + PostgreSQL = it Works, but doenst find records
Php + PostgreSQL = it Works, but doenst find records
ThalesPereira
Posts: 6Questions: 0Answers: 0
Hello,
I will try to be quick and clean :)
Im using the script provided on this link http://datatables.net/development/server-side/php_postgres
Following, the changes i made on the file:
[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( 'field1', 'field2', 'field3' );
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "id";
/* DB table to use */
$sTable = "the_table";
/* Database connection information */
$gaSql['user'] = "thegood";
$gaSql['password'] = "thebad";
$gaSql['db'] = "theugly";
$gaSql['server'] = "thebacon";
[/code]
And.. the output i get is:
[quote] No matching records found [/quote]
Anyone have idea what i could be missing? =)
I will try to be quick and clean :)
Im using the script provided on this link http://datatables.net/development/server-side/php_postgres
Following, the changes i made on the file:
[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( 'field1', 'field2', 'field3' );
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "id";
/* DB table to use */
$sTable = "the_table";
/* Database connection information */
$gaSql['user'] = "thegood";
$gaSql['password'] = "thebad";
$gaSql['db'] = "theugly";
$gaSql['server'] = "thebacon";
[/code]
And.. the output i get is:
[quote] No matching records found [/quote]
Anyone have idea what i could be missing? =)
This discussion has been closed.
Replies
Allan
The weird thing is, the output of the server_pg_processing.php file seens ok:
{"sEcho":0,"iTotalRecords":2,"iTotalDisplayRecords":2,"aaData":[["bacon","salad"],["1","2"]]}
echoing the sql output also shows me the desired result.
sEcho should never ever be 0. It simply won't work. So I guess that might be part of the issue - looking at the code it shouldn't be 0 there either.
Can you provide a link to a test case or run the table through the debugger so we have more information available please?
Allan
I have the code im using pasted here: http://justpaste.it/datatablehtml
and the php file to connect is the one that cna be found here : http://www.datatables.net/development/server-side/php_postgres.
Im not at work right now, but as soon i arrive i will post the debug output.
Regards