SQL Server 2012+ SSP.class

SQL Server 2012+ SSP.class

theflarenettheflarenet Posts: 25Questions: 4Answers: 0
edited May 18 in Free community support

Has anyone successfully ported the Server-side processing SPP.class.php from MySQL to Microsoft SQL Server 2012+ in it's entirety? Every search results to incomplete pieces without anyone sharing the full code and I'm having trouble trying to piece it together. Hoping there's one out there!

Answers

  • mfranklin3570mfranklin3570 Posts: 1Questions: 0Answers: 0

    Have you gotten an answer to this? If so, please share.

  • allanallan Posts: 46,556Questions: 1Answers: 6,497 Site admin

    I think you'd probably need to modify it. The only changes should be in the PDO connection string and the LIMIT / OFFSET to make it match SQL Server syntax.

    Allan

  • theflarenettheflarenet Posts: 25Questions: 4Answers: 0

    Thanks @allan. That is the issue I'm dealing with at the moment as I'm trying to piece things together. Was hoping there was already a complete example/template that I can reference.

    @mfranklin3570, unfortunately not... I'm struggling over here.

  • allanallan Posts: 46,556Questions: 1Answers: 6,497 Site admin

    Perhaps you can post what you've got and any error message your are getting?

    Allan

  • khardykhardy Posts: 2Questions: 0Answers: 0

    I hear ya. I've been playing with this for a bit, and just using the datatables_demo example with SQL 2016 I've got the connection, query results, sorting and paging working, but the filter function is still a bit of a mystery to me. When applying a filter I'll get the error (customized so it shows the query):

    DataTables warning: table id=example - An SQL error occurred: SQLSTATE[07002]: [Microsoft][ODBC Driver 13 for SQL Server]COUNT field incorrect or syntax error
    Your query is:

    SELECT count(id) FROM datatables_demo WHERE ( first_name LIKE :binding_0 OR last_name LIKE :binding_1 OR position LIKE :binding_2 OR office LIKE :binding_3 OR start_date LIKE :binding_4 OR salary LIKE :binding_5)

    Everything else appears to work though. Hopefully this helps.
    (and if anyone can contribute on that filter function I'd be grateful)

  • khardykhardy Posts: 2Questions: 0Answers: 0

    Aaand I just realized what I posted was from a modified version 1.10.5 (if that matters to your version)

  • allanallan Posts: 46,556Questions: 1Answers: 6,497 Site admin

    What happens if you run that query directly against the database (using SQL Server management studio or the like)?

    Allan

Sign In or Register to comment.