I am trying to create a custom connection to my database through Magento 2.1.8
.
I am trying to use the mysqli
library.
The method I am using worked in Magento 1.9 but will not work in my current version.
$conn = new mysqli($servername, $username, $password, $database);
When i use this code, i am receiving an error:
Uncaught Error: Class 'VendorName\Forum\Controller\Post\mysqli' not found in /domains/mywebsite.com/http/app/code/VendorName/Forum/Controller/Post/postMessage.php:28
How do i import the mysqli class to create this object?
Thanks.