I am using MDB2 to make query to my MySQL database but when I query the database, the MySQL log trace 2 statements: the first one is an explain statement and the second is my query.
Here is the code:
$sql = "SELECT 1 FROM DUAL";
$mdb2Instance = new MDB2();
$options = array(
'portability' => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_FIX_CASE,
);
$connection = $mdb2Instance->singleton($dsn, null);
$connection->setFetchMode(MDB2_FETCHMODE_ASSOC);
$connection->query($sql);
And I get the following log in MySQL:
5 Init DB cma
5 Query EXPLAIN SELECT 1 FROM DUAL
5 Query SELECT 1 FROM DUAL
5 Quit
Can someone explain me what's happening and how to prevent this?
Regards
Alban