Server side multi table script

Server side multi table script

PonchiaPonchia Posts: 6Questions: 3Answers: 0

Hi all!
I found this script: http://datatables.net/dev/server_processing.txt

But at line 65 there is a sintax error, actually I'm not able to fix it alone.

Somebody can help me?

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    What is the syntax error?

  • PonchiaPonchia Posts: 6Questions: 3Answers: 0

    $sOrder .= $aColumns[ intval( $GET['iSortCol'.$i] ) ]."
    ".($GET['sSortDir'.$i]==='asc' : 'asc' : 'desc') .", ";

    The first ":"

    Chrome say only this to me

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    'asc' : 'asc'

    Change it to

    'asc' ? 'asc'

  • PonchiaPonchia Posts: 6Questions: 3Answers: 0
    edited January 2015

    It works! Thanks :)

    May I ask another question?

    It's better to use this thing, to take data from 2 table or a view?

    Cause I need only to show them, and I was thinking which one is faster...

This discussion has been closed.