fixing database method row()

it returns empty array if it has empty results instead of empty object