Reading boolean correctly from Postgres by PHP

后端 未结 4 1147
野性不改
野性不改 2021-02-14 14:58

The main problem of this thread is moved to here about boolean datatype in PHP / Postgres.

The problem is the conversion of t and f to

4条回答
  •  失恋的感觉
    2021-02-14 15:35

    Try:

    if ( $_SESSION['login']['a_moderator'] ) {
      // do this
    }
    

    It is a boolean, not a string.

提交回复
热议问题