Welcome Guest, Not a member yet? Register   Sign In
Temporary DB prefix override
#2

Quick update on what I've found so far:
* There is a function "setPrefix()" in CodeIgniter\Database\BaseConnection that allows changing the current database prefix; no luck so far getting a model to implement and reset this, but an option for procedural tasks
* Using the database class to write a query directly allows explicitly naming a table sans prefix: $db->query('SELECT * FROM users');
* Using the query builder class *will* always include the prefix: $builder = $db->table("users") - results in "pre_users"

Hope that helps someone
Reply


Messages In This Thread
Temporary DB prefix override - by MGatner - 03-05-2019, 10:31 AM
RE: Temporary DB prefix override - by MGatner - 03-05-2019, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB