DataTables and Editor issue
DataTables and Editor issue
Hello,
I downloaded DT1.10 and Editor 1.3.1. I'm running Postgres 9.0.17, PHP Version 5.3.28.
Installed both, and changed php config for database connection.
Run the editor example and I receive error:
DataTables warning Table id=example - SQLSTATE[42601]
Syntax Error 7: syntax error at or near "'id'"
LINE 1: SELECT id as 'id', first_name as 'first_name'....
I checked postgres error log, there's similar error.
2014-06-20 17:14:48 MYT ERROR: syntax error at or near "'id'" at character 15
2014-06-20 17:14:48 MYT STATEMENT: SELECT id as 'id', first_name as 'first_name', last_name as 'last_name', updated_date as 'updated_date', registered_date as 'registered_date' FROM users
I ran the above select statement in PGADMIN 3 also giving error.
When I remove the single quote, it's working.
Any idea on how shall I proceed in running the DT and Editor?
Thanks.
This question has accepted answers - jump to:
Answers
Hi,
I'm afraid there is a bug in the current version of Editor when using Postgres! I'm going to release 1.3.2 with the fix next week, but until then the fix is actually fairly simple. In the file
php/Database/Driver/Postgres/Query.php
add the following line into the class that is defined in the file:And that should do it!
Regards,
Allan
Thanks, Allan.
Let me try now....
UPDATE:
It's working.....
I do not want to create another thread because it's similar environment.
During the SQL installation, there's error during the creation of TODO Table:
2014-06-20 16:39:54 MYT ERROR: column "done" is of type boolean but expression is of type integer at character 550
2014-06-20 16:39:54 MYT HINT: You will need to rewrite or cast the expression.
Boolean value does not accept 0 or 1. I change the script to T & F.
This might create future issue in my current installation.
Sorry yes, that's another one that will be in the 1.3.2 release... I've used
"t"
in the fix, but any boolean will do (I really thought Postgres did accept 0 and 1 as false and true before - an old version possibly... Or more likely my bad memory ;-) ).Allan