Fix issue #1359

Remove of unused $db and remove the option of passing a Database_Connection instance for $connection
Merge pull request #1362 from daidais/patch-1

Fix issue #1359