How to use 'Where' in server side processing sample

How to use 'Where' in server side processing sample

swfswf Posts: 3Questions: 0Answers: 0
edited January 2013 in General
I'd just like to display a table with a SQL Statement like this: "Select * from mytable WHERE active = 1"

Are there any samples how add a WHERE statement to the server side processing sample?

Replies

  • swfswf Posts: 3Questions: 0Answers: 0
    After hours of testing other code, the solution was simpler than expected. Just adding the WHERE statement into:

    /*
    * SQL queries
    * Get data to display
    */
    $sQuery = "
    SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
    FROM $sTable
    WHERE active = 1 AND NOW() >= activeDate
    $sWhere
    $sOrder
    $sLimit
    ";

    Seems to work ...
This discussion has been closed.