I have created a class in PHP to handle most of the work dealing with the MySQL database. Here is a code example:
class DataAccessBase
{
protected $sql_wr;
protected $sql_ro;
function __construct()
{
$this->sql_wr = new mysqli();
$this->sql_ro = new mysqli();
$this->sql_wr->ssl_set(DB_WR_SSLKEY, DB_WR_SSLCERT, DB_WR_SSLCA, NULL, NULL);
$this->sql_ro->ssl_set(DB_RO_SSLKEY, DB_RO_SSLCERT, DB_RO_SSLCA, NULL, NULL);
}
When the constructor runs, I get "Commands out of sync..." error on the new mysqli();. Both of them.
All of the searching I have done discusses incorrect code trying to do multiple queries. I get the error before I even open the connection.
What am I missing?
I have tried using the mysqli_init() also and it returns the same error.