How can I request a stored procedure in SSP::simple() ?

How can I request a stored procedure in SSP::simple() ?

SkyScreamSkyScream Posts: 22Questions: 1Answers: 0
edited January 2015 in Free community support

My next attempt. I tried to create the JSON manually. But it seems the pagination and column data get screwed up this way.

So ignoring that attempt. I want to use the set up inside the server-side example.
But the problem is, I need to call a stored procedure. Not a table. I need to pass variables into the stored procedure.

in this example:

echo json_encode(
SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
);

How can I send a stored procedure request with variables, instead of using $table?

Replies

  • ahrefahref Posts: 9Questions: 1Answers: 1

    This isn't a data table issue.

    Its server side processing, You might get a better response over at the support site for SSP::simple.

  • SkyScreamSkyScream Posts: 22Questions: 1Answers: 0
    edited January 2015

    If Datatables is using it, then I'm sure there's some support for it somewhere in here. Most of Datatables is a "Jquery," "HTML," "PHP," "JSON," etc "issue."

    So if the rest of Datatables is a datatable issue, then this also is a Datatable issue.

    Especially since it's being used as the core of the server-side processing for Datatables.

  • SkyScreamSkyScream Posts: 22Questions: 1Answers: 0

    hmm It might not be possible. But I have a solution. I can just edit the ssp.class.php
    file to do a stored procedure query instead of a select query..

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin

    Yes, you would need to modify the demo SSP class. It wasn't designed to work with stored procedures.

    Perhaps you could post a diff of your changes so others might be able to use it in future as well if they are interested?

    Thanks,
    Allan

  • nigelbnigelb Posts: 4Questions: 1Answers: 0

    Any chance you could post those changes?

    Is it possible that this could be a solution to get Editor::inst() to accept a stored procedure also?

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin

    At the moment, the PHP Editor class will not read from a stored procedure I'm afraid to say. That is an enhancement I'm considering for future versions.

    Allan

  • rw152rw152 Posts: 56Questions: 15Answers: 1

    Stored Procedure support would be huge. I'm always paranoid about SQL injection attacks. I'd pay another sum of money to see that feature added. I'm sure I'm not alone on this.

    Already bought Editor -> great product! Again, the only let down I have experienced is lack of stored procedure support.

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin

    Thanks - yes, I think this is an important feature and most certainly something that will be added in future - when I said "considering" before the only point to consider is when it will be implemented, which is just a resource issue (i.e. me :-) ).

    Allan

This discussion has been closed.