public function selectAssoc($sql, $arg1 = null, $arg2 = null)
{
$stmt = $this->execute($sql, $arg1, $arg2);
if (!$stmt) {
return null;
}
$result = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
// Required to really close the connection.
$stmt = null;
return $result;
}