as david grew older and more feeble , he paid less and less attention to these affairs and so , when his days were numbered and he lay weak upon his bed , adonijah proclaimed himself king behind david 's back .