Actually it's a database abstraction layer since it deals with specifics of multiple databases which means less work for you if you wish to switch from one dbms to another, or need to use more than one dbms.
If you want to create array indices from 0 and up, you don't need to specify the index as described here http://se2.php.net/manual/en/language.types.array.php.
For each row, you are overwriting the value in $getCertificate for each new pass through the foreach loop, meaning you end up only with the last field for each row in your array. And since $row allready looks exactly the same as how I'm guessing you'd want $getCertificate to look, why not
while ($row = ) {
$allCertificates[] = $row;
}
Also, iirc MDB2 contains functions to return data from a query directly. So if you want to put the entire result in an array, there is no need to use query and fetch
$mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
$field = $mdb2->queryOne('SELECT field FROM table WHERE id = 1');
$row = $mdb2->queryRow('SELECT field, field2, field3 FROM table WHERE id = 1');
$rows = $mdb2->queryAll('SELECT field, field2, field3 FROM table');
echo 'field: ' . $field;
echo 'single row: ' . print_r($row, 1);
$numrows = count($rows);
for ($i = 0; $i < $numrows; ++$i)
echo "row $i: field1: " . $row['field1'] . ' field2: ' . $row['field2'];