Hello
It's me again as you know i'm new in Magento and something is disturbing me i'm searching a way to call the database prefix set in the begining of the installation like _DB_PREFIX_ in Prestashop but every post i saw about this wasn't really clear and very complicated for something that simple can someone tell me if there is a simple way pls ?
Solved! Go to Solution.
If you want to get table name into your install schema then use below link for reference
https://mage2.pro/t/topic/529/2
You can get tablename like below way,
$obj = \Magento\Framework\App\ObjectManager::getInstance(); $connection = $obj->get('Magento\Framework\App\ResourceConnection')->getConnection(); $prefixTablename = $connection->getTableName('tablename'); // pass your tablename echo $prefixTablename;
Please let me know if you have query or I am wrong.
If you want to get table name into your install schema then use below link for reference
https://mage2.pro/t/topic/529/2
thanks you