SSP.class.php for PDO Postgresql

SSP.class.php for PDO Postgresql

byoskopbyoskop Posts: 2Questions: 1Answers: 0
edited January 2023 in DataTables 1.10

Hello,
i found here a discussion about that problem, but in my case i still got an error :

          ** An SQL error occurred: SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "order"
         LINE 1: ..., fname, lname, adresse, zip...
          ^ [with] 'SELECT id, fname, lname, adresse, zip, count(*) OVER() AS total_count
         FROM  (
     SELECT id, fname, lname, adresse, zip FROM 
         "public"."fpresse"; 
          ) temp

         ORDER BY id ASC
         OFFSET 0 LIMIT 10'**: 

I took the ssp.class.psql.php file from here : https://gist.github.com/stevevance/ba2ca35d96b820d6908f

I have also followed the instructions, but i can't figure out this issue.
I use the datatables version 1.13.1, PHP 8.1 and Postgresql 14.6

Thanks in advance

Achille

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Hi Achille,

    I'd suggest you just skip the SSP class entirely and use the Editor libraries for server-side processing. They are open source, so you are free to use them without an Editor license (they don't have the ability to do a group by though - which it looks like you might be using there).

    However, if you want to use the SSP class, I would suggest you echo out the generated SQL statement as it isn't clear from that error message what the issue is.

    Allan

  • byoskopbyoskop Posts: 2Questions: 1Answers: 0

    Hello Allan,
    thank you very much, OK, i will try your solution.
    Otherwise i have found the issue, it was a problem with my query.
    Thank you very much !!!

    cheers

Sign In or Register to comment.