Can we use Datatables Editor php library with database functions ?

Can we use Datatables Editor php library with database functions ?

tadasstyrtadasstyr Posts: 11Questions: 5Answers: 0

We use PostgreSQL and we do not work directly with database tables, for example all data manipulation is done by using custom database functions. Our database admin makes all functions

for example:
SELECT f_register_service ( '{"service_name":"Testing"}' ); //returns service_id

SELECT f.service_id, f.service_name FROM fr_service_time() AS f //returns rows

SELECT f_create_update_customer(0, 'customer name') AS f //returns customer_id, 0 - new customer

As we see from examples Datatables editor is mostly designed to work with database tables directly. Can we use Datatables Editor default PHP library in our case and how we should do that ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,493Questions: 1Answers: 10,470 Site admin
    Answer ✓

    No - the provided Editor PHP libraries don't work with functions being used to update tables I'm afraid. As you say, they generate their own SQL update / insert / etc statements.

    If using functions you'd need to replace the provided PHP libraries with your own calls to your functions.

    Allan

This discussion has been closed.