Added getAllRows function to database