Variable in where

Variable in where

gpontarogpontaro Posts: 11Questions: 2Answers: 0

Hi all

I would like to introduce a where condition for displaying rows of my table.
->where( 'operatore', $_SESSION['login_user'])
->process( $_POST )
->json();

but unfortunately it seems not working with session variables. Possible ?

Thanks a lot
best regs.
gp

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 54,703Questions: 1Answers: 8,556 Site admin
    Answer ✓

    That looks like it should work to me - as long as $_SESSION['login_user'] contains a value that is in the operatore column.

    What happens when you run it - do you always get zero results? If so, that suggests that the condition is not being met.

    Allan

  • gpontarogpontaro Posts: 11Questions: 2Answers: 0

    it is working I forgot session_start();

    thanks a lot !

    gp

This discussion has been closed.