1 (edited by mr.murtaza.abbasi 01/22/2020 03:35:11 am)

Topic: How to get TB_PREF defined value?

I've been trying to figure out either core function is defined TB_PREF or I'll have to make a function for it. I'm making several functions and I don't from where to get TB_PREF for SQL query...

Update--
I found that TB_PREF is defined in current_user.php with value of &TB_PREF&, so how it is used?

Solution--
As mentioned above, TB_PREF is defined in current_user.php with value of &TB_PREF& which then is replaced with prefix of company related tables in db_mysqli.php using str_replace() function...

Re: How to get TB_PREF defined value?

The actual value of TB_PREF is in the $db_connections[#]['tbpref'] array element in config_db.php's  that pertains to the company (#) logged in.

3 (edited by mr.murtaza.abbasi 01/25/2020 03:44:50 am)

Re: How to get TB_PREF defined value?

And when db_query() function is triggered, that &TB_PREF& from query string is replaced by current user tbpref variable initiated in $_SESSION[]...