≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
How to use 'Where' in server side processing sample
How to use 'Where' in server side processing sample
swf
Posts: 3
Questions: 0
Answers: 0
January 2013
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
swf
Posts: 3
Questions: 0
Answers: 0
January 2013
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.
Replies
/*
* 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 ...