function get($tab)
{
// $this->jerr("Not authenticated", array('authFailure' => true));
- echo '<PRE>';print_R($_GET); DB_DataObject::debuglevel(1);
+ //echo '<PRE>';print_R($_GET); DB_DataObject::debuglevel(1);
$this->init(); // from pnan.
//print_r($x);
// build join if req.
- DB_DataObject::debugLevel(1);
+ //DB_DataObject::debugLevel(1);
$total = $x->count($this->countWhat);
// sorting..
//
* @arg DB_DataObject $x
*
*/
- function applySort($x)
+ function applySort($x, $sort = '', $dir ='')
{
// Db_DataObject::debugLevel(1);
- $sort = empty($_REQUEST['sort']) ? '' : $_REQUEST['sort'];
- $dir = (empty($_REQUEST['dir']) || strtoupper($_REQUEST['dir']) == 'ASC' ? 'ASC' : 'DESC');
+ $sort = empty($_REQUEST['sort']) ? $sort : $_REQUEST['sort'];
+ $dir = empty($_REQUEST['dir']) ? $dir : $_REQUEST['dir'];
+ $dir = $dir == 'ASC' ? 'ASC' : 'DESC';
}
if (count($ar)) {
- var_dump($key);
- var_dump($this->colsJoinName);
+
$x->whereAddIn(
- isset($this->colsJoinName[$key]) ?
- $this->colsJoinName[$key] :
+ isset($this->colsJname[$key]) ?
+ $this->colsJname[$key] :
($x->tableName(). '.'.$key),
$ar, $quote ? 'string' : 'int');
}
$key = substr($key, 1) ;
$x->whereAdd( (
- isset($this->colsJoinName[$key]) ?
- $this->colsJoinName[$key] :
+ isset($this->colsJname[$key]) ?
+ $this->colsJname[$key] :
$x->tableName(). '.'.$key ) . ' != ' .
(is_numeric($val) ? $val : "'". $x->escape($val) . "'")
);