Section 35-6-22

Duty of court to declare rights of parties.

The court shall ascertain and declare the rights, titles, and interest of all the parties to such action, the plaintiffs as well as the defendants, and shall give judgment according to the rights of the parties.

(Code 1923, §9333; Code 1940, T. 47, §188.)