Serverside Filtering based on User Login
Serverside Filtering based on User Login
gadeinna
Posts: 4Questions: 0Answers: 0
Hi All,
I need to have serverside filtering based on user login.
I have two database tables, i.e user table and upload table.
User table is below
[code]
USERNAME PASSWORD JOINING DATE
Jose ***** 9/5/2013
Daniel ***** 9/5/2013
Mary ***** 9/5/2013
Joe ***** 9/5/2013
upload table is below
NAME DEPARTMENT SALARY UPLOADED BY
Raky PG 14000 Daniel
Ankey DL 12000 Mary
Munfa PG 8000 Joe
Cicilia PG 9000 Mary
Randy SIL 13000 Jose
Pandu DL 10000 Daniel
Arun PG 7000 Joe
Kumay SIL 5000 Mary
Mark DL 9800 Jose
Now when ever user login, the data uploaded by respective user should be displayed.
For Daniel login, table should look
NAME DEPARTMENT SALARY
Raky PG 14000
Pandu DL 10000
For Mary login, table should look
NAME DEPARTMENT SALARY
Ankey DL 12000
Cicilia PG 9000
Kumay SIL 5000
For Joe login, table should look
NAME DEPARTMENT SALARY
Munfa PG 8000
Randy SIL 13000
Arun PG 7000
For Jose login, table should look
NAME DEPARTMENT SALARY
Randy SIL 13000
Mark DL 9800
[/code]
Can anyone help please?
I need to have serverside filtering based on user login.
I have two database tables, i.e user table and upload table.
User table is below
[code]
USERNAME PASSWORD JOINING DATE
Jose ***** 9/5/2013
Daniel ***** 9/5/2013
Mary ***** 9/5/2013
Joe ***** 9/5/2013
upload table is below
NAME DEPARTMENT SALARY UPLOADED BY
Raky PG 14000 Daniel
Ankey DL 12000 Mary
Munfa PG 8000 Joe
Cicilia PG 9000 Mary
Randy SIL 13000 Jose
Pandu DL 10000 Daniel
Arun PG 7000 Joe
Kumay SIL 5000 Mary
Mark DL 9800 Jose
Now when ever user login, the data uploaded by respective user should be displayed.
For Daniel login, table should look
NAME DEPARTMENT SALARY
Raky PG 14000
Pandu DL 10000
For Mary login, table should look
NAME DEPARTMENT SALARY
Ankey DL 12000
Cicilia PG 9000
Kumay SIL 5000
For Joe login, table should look
NAME DEPARTMENT SALARY
Munfa PG 8000
Randy SIL 13000
Arun PG 7000
For Jose login, table should look
NAME DEPARTMENT SALARY
Randy SIL 13000
Mark DL 9800
[/code]
Can anyone help please?
This discussion has been closed.
Replies
Allan
{
if ( !isset( $_SESSION[ 'ADMIN' ] ) )
$this->_redirect( "index/login" );
$this->template->ADMIN = array(
"name" => "ADMIN",
"value" => $_SESSION[ 'ADMIN' ]
);
}
private function checkUserLogged( )
{
if ( isset( $_SESSION[ 'ADMIN' ] ) )
$this->_redirect( "index/dashboard" );
}
This is the function, we use to know the user login. Can you please give an example to make changes to query?