sql join in server side processing

sql join in server side processing

secoseco Posts: 17Questions: 6Answers: 0

the samples provided in the site uses a simple sql statement
can i use a sql join instead?
if so. can i return html control instead of simple text
thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • glendersonglenderson Posts: 231Questions: 11Answers: 29
    edited December 2015

    If you create your own ajax page, you can create as complex of a SQL as necessary. I typically pull in data from half a dozen tables with multiple inner join conditions and where conditions along with group aggregates. You only have to format the return of the ajax page to be in a JSON format.

  • secoseco Posts: 17Questions: 6Answers: 0
    edited December 2015

    how do you write that complex sql statements ?
    i mean how do you pass that statements to datatables

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin
    Answer ✓

    You wouldn't pass any SQL to DataTables, but rather the results from the SQL that you run should be given as JSON data.

    @glenderson was noting that you can use any SQL you want to get the data. As you say the demos on this site are simple single table selects. If you want to base your code off my examples, you would need to modify the examples to operate with joins.

    Allan

This discussion has been closed.