Using server side without ssp class
Using server side without ssp class
redani
Posts: 70Questions: 1Answers: 0
Hi Allan, hope you're doing well.
I'd like to ask you if there is any script sample for server side without the ssp class. I've noticed that I can use some GET variables such as start, length, ... but it'll be nice to have a sample.
Thanks a lot
Regards
This discussion has been closed.
Replies
The SSP class is my demo script for server-side processing. I don't have any other's. If you needed it without a class you could dissect the class and build a simple linear function.
Allan
Thanks Allan for your fast reply.
OK, i'll do that.
Have a great week
Hi again, I'm trying to implement the server side and have the following questions pls:
1- I've noticed that in addition to Dara, I need to return draw, recordsTotal and recordsFiltered.
1.1- how can I tell the value of draw?
1.2- do you think I'll need another SQL query to get the value of recordsTotal?
2- I've also noticed that the ajax call is made on keydown, is it possible to use some kind of timeout to make the ajax call every 400ms for example?
Thanks
See the server-side manual page for full details of what is sent and expected back.
Yes
searchDelay
.Allan
Thanks again Allan for your reply.
1- I'm almost done but paginations dont work, it always shows 1 page, I'm sure i must be missing something stupid!
here is what I'm doing in my server side script:
What am I doing wrong? and how are the paginations calculated?
3- Also I have noticed that in your examples you use: "processing": true, what is that for?
4- is it possible to style the "Processing..." message by replacing it by a spinner for example?
Thanks a lot
That suggests that the LIMIT isn't being applied to the query you are using to get the data from the table (which I don't actually see above - it shows the queries for the record counts).
Allan
I'm sorry Allan, but i don't really understand you well!
I'm using the LIMIT in the second query to get data, and it's always returning $length results only.
In your example, if I search for "ra", it will return 26 results, that means you don't use LIMIT $start, $length in your query, right?
So, how and where should I use $length?
You need three queries:
I see only 2 queries in the code above. However, it is hard to say exactly what is happening in the pseudo code since it isn't exactly what is running.
Allan
Great, it works like a charm thanks a lot
Allan, please one last question.
I'm currently working on a project using Vue.js and was wondering if you're planning to release a version compatible with this library. If not, do you recommend any equivalent?
Thanks
I don't currently have any plans to release any Vue components, although it is certainly something I would like to look at in future. I haven't used Vue much myself, so I can't really give any recommendations I'm afraid.
Allan
OK, thank you very much Allan.
Have a lovely night