I'm working on an ExpressionEngine 3.5.10 website. All my tables are prefixed with exp_
I've added 3 tables to my database to store some data relating to a custom written PHP ecommerce module. These tables do not use the prefix, and are called: ecom_orders
, ecom_attendees
and ecom_products
.
In one of my EE templates - with PHP set on output - I've written the following to try and insert data in one of my tables:
ee()->db->insert(
'ecom_orders',
array(
'billing_title' => $_SESSION['basket']['billing']['title'],
'billing_firstName' => $_SESSION['basket']['billing']['firstName'],
'billing_surname' => $_SESSION['basket']['billing']['surname'],
// ...
) );
The trouble with this is that I get an SQL error because instead of using the table name ecom_orders
, it's changing it to exp_ecom_orders
.
How can I reference the table by the name I want (ecom_orders
) and get it to ignore the prefix?
I checked the database class docs https://docs.expressionengine.com/latest/development/legacy/libraries/database.html but there's nothing in it about that.