Difference Between DataTables Editor and DataTables?

Difference Between DataTables Editor and DataTables?

DanOshDanOsh Posts: 37Questions: 11Answers: 1
edited March 2015 in General

I love this application and just purchased DataTables Editor. I do have one question that keeps coming to me as I research the examples and forum for both DataTables and the DataTables Editor.

I will be using the following two URL's and a specific problem.

I wanted to apply the following: Edit boxes, Record Display Count, Search Box, Individual Column Search and a Where Statement.

Using the DataTables Editor, searching the forum and with Replies from the forum, it all works wonderfully in the following URL. (Which is why I just purchased) using the PHP/Server-side example -
http://www.skywateryachts.com/datatables_editor/boats_reduced.html

However, using the PHP Server-Side example from just DataTables, in trying to implement the Record Display Count, Search Box, Individual Column Search functions at http://www.skywateryachts.com/datatables/boats_reduced_clients.html, I get an error applying a Where Statement in the SSP file when trying to use either the Search Box or Individual Column Search functions -

$data = self::sql_exec( $db, $bindings,
"SELECT SQL_CALC_FOUND_ROWS `".implode("`, `", self::pluck($columns, 'db'))."`
FROM `$table` WHERE Reduced = 'Reduced'
$where
$order
$limit"

This code works in the applicable PHP file for the http://www.skywateryachts.com/datatables_editor/boats_reduced.html page without errors.

->where( $key = "Reduced", $value = "Reduced", $op = "=" )
->process( $_POST )
->json();

I also had to remove string character values out of DataTables yet didn't for the same functions in the DataTables Editor.

Hopefully I'll get an answer to the WHERE statement above, but was wondering is it best with this application to continue using examples with just the Editor (and learn from them) or go back and forth from the DataTables Editor and DataTables as I am. I just get frustrated when one works, then the other doesn't.

It just appears the Editor coding is easier to use and understand. ??

This is not to be critical of the application at all. Just some thoughts as I am reading through the manual, reading through posts, etc.

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    If you are using Editor's PHP libraries, ignore totally and utterly the SSP class. Editor's libraries fully implement server-side processing themselves and will automatically detect server-side processing requests and reply to them correctly. Example here.

    You can also use the Editor libraries as a 'get' data source for tables you don't want to be editable. Just don't add editing controls on the client-side for readonly tables.

    It just appears the Editor coding is easier to use and understand. ??

    I'm pleased to hear that - it should be! The SSP class is really just a demo script to show how it can be done. It is designed to be modified by developers to suit their needs. Editor on the other hand is a commercial product, not just a demo :-)

    Allan

  • DanOshDanOsh Posts: 37Questions: 11Answers: 1

    Very Good Allan!

    That takes care of my answer above too! (I was actually beginning the process of using everything from DataTables Editor.) :-)

    Awesome.

    Thanks

This discussion has been closed.