*64CHIPMAN, P. J.
This is an action for the foreclosure of certain mortgages upon real property situated in the city of Sacramento.
Judgment went against defendant Hartley for the several sums mentioned in plaintiff’s amended complaint? as secured by said mortgages and foreclosure was ordered. It was found by the court that defendant, Broooke Realty Company, had no-interest in the subject-matter of the action. Defendant Hartley made default. Defendants Trainor and Bethel answered. Defendant Bethel alone appeals, his appeal being from the judgment and from the order denying his motion for a new trial.
There are two separate transcripts, the present -one, No. 1116, an appeal from the judgment, and No. 1271, an appeal from the order. By stipulation both appeals are presented together in the same brief.
The land involved consists of two separate parcels—one parcel being the north one-half of the south one-half of lot numbered one in the block bounded by T and U and 25th and 26th streets (hereinafter designated as parcel “A”); the other parcel being the south one-quarter of said lot (hereinafter designated as parcel “B”), the two parcels constituting the south one-half of said lot.
It appears that, on and prior to September 30, 1910, to wit, on November 16, 1909, plaintiff and his wife, Belle Morris, were the owners of the said property; on November 16, 1909, they executed their promissory note to Susie Harlow for the sum of two thousand dollars, due one year after date, at ten per cent interest, payable monthly, and if not so paid, an option was given to treat the principal as due. It also provided that if not paid at maturity the note “is hereby renewed from year to year, at the option -of the holder”; plaintiff and his wife, on the same day, executed their mortgage to said Susie Harlow to secure the payment of said note on what we designate as parcel “A.” On November 16, 1909, plaintiff and his wife executed to B. P. McIntyre and Lulu Speer their promissory note for two thousand dollars secured by mortgage on parcel “B.” Neither of these last named persons was made party to the action and, of course, they are not concerned with the decree. The court, however, in ordering the sale of parcel “B,” directed that it be sold subject to the mortgage of McIntyre and Speer.
*65It appears from the amended complaint that, on September 30, 1910, plaintiff sold all of said land to defendant Hartley for the sum of six thousand one hundred dollars, payable as follows: Five hundred dollars at the execution of the deed; two thousand dollars when due on the Susie Harlow promissory note; two thousand dollars when due on the McIntyre and Speer promissory note; seven hundred and fifty dollars to be paid plaintiff in seven years with ten per cent interest per annum, “to be secured by promissory note and mortgage upon” parcel “A”; and eight hundred and fifty dollars to be paid in eight years with ten per cent interest per annum, to be secured by promissory note and mortgage upon parcel “B,” pursuant to which said agreement said notes and mortgages were duly executed and delivered by Hartley to plaintiff and said mortgages were duly recorded; that, on October 5, 1910, defendant Hartley conveyed the land by deed to defendant Trainor, duly recorded on that day, and, at defendant Hartley’s request, plaintiff and his wife, on October 10, 1910, executed and delivered to Hartley their deed to said land, which was duly recorded October 20, 1910, but that said deed “was executed as a mere correction of the former deed dated September 30, 1910, in which the name of Belle Morris, his wife, was inadvertently omitted,” and it appeared at the trial that this second deed to Hartley was without further consideration and was given because the title, on said last named date, was in plaintiff and his wife; that, on January 16, 1911, defendant Trainor executed and delivered to defendant Bethel his deed to said land which was on that date duly recorded. It appeared that in each of the promissory notes given by Hartley to plaintiff there was a provision that the “principal is due and payable each month in installments of $10.00 (ten dollars) or more.” There was also a provision that should Hartley fail to make payment as provided in said notes, either of principal or interest, plaintiff had the option to treat the notes as due. It is alleged that, except the sum of five hundred dollars paid by Hartley to plaintiff at the time of the execution of said deed to him, said Hartley has failed and neglected to pay any part of either of said two promissory notes and the same are now due “and plaintiff now exercises his such option to collect the same in full. ’ ’ It is further alleged that the Susie Harlow encumbrance on said, property of two thousand dollars, “which defendant Hartley *66agreed to pay when due as part of the consideration for the sale to him of the said land, became due on the 16th day of November, 1910, and neither defendant Hartley nor any of the aforesaid subsequent purchasers of the said land paid the same; that plaintiff was thereupon obliged to discharge such obligation and, on or about the 5th day of December, 1910, paid to' said Susie Harlow the said sum of $2,000.00” with interest and, on said fifth day of December, 1910, she duly satisfied said mortgage by indorsement on the margin of the book of mortgages in the said county; that "the said encumbrance for the sum of $2,000.00 to B. P. McIntyre and Lulu Speer which defendant Hartley agreed to pay . . . became due on the 1st day of November, 1910, . . . and is still a subsisting encumbrance in the sum of $2,000.00 and interest thereon upon said land”; that neither defendant Hartley nor either of said subsequent purchasers of said land has paid the said sums of seven hundred and fifty dollars and eight hundred and fifty dollars secured by the said mortgage to Susie Harlow and the whole thereof, to wit, the sum of three thousand six hundred dollars is due and owing plaintiff from said defendant Hartley; that by reason of plaintiff’s having paid to said Susie Harlow the amount called for in her said mortgage plaintiff is subrogated to her rights.
The amended complaint then proceeds to state what purport to be second, third, fourth, and fifth causes of action. In each of them the averments of the first cause of action are re-averred and made part thereof except, in the fifth cause of action, certain two paragraphs, not important to notice, are omitted. The second cause of action simply repeats Hartley’s liability to pay the Susie Harlow mortgage. The third cause of action alleges that neither Hartley nor "either of the aforesaid subsequent purchasers, has paid” the eight hundred and fifty dollar note and mortgage of Hartley to plaintiff. The fourth cause of action alleges that neither Hartley nor either of said subsequent purchasers, has paid said seven hundred and fifty dollar note and mortgage executed by Hartley to plaintiff. The fifth cause of action alleges that neither Hartley nor either of said subsequent purchasers has paid, except the sum of five hundred dollars, the purchase price for which the said land was sold to Hartley by plaintiff.
The prayer of the complaint is for judgment against Hartley for the sum of five thousand six hundred dollars with *67interest at ten per cent per annum from September 30, 1910, and the sum of two hundred dollars attorney’s fees and costs and for the usual order of sale of the premises, the proceeds to be applied in payment of the McIntyre and Speer note and mortgage and interest and “in payment of the amount of $3,600.00 and interest thereon as aforesaid to plaintiff and the further sum of $200.00 with which to pay attorneys and counsel fees, and that the defendants and all persons claiming under them or either of them, either as purchasers or encumbrancers, or otherwise, may be barred and foreclosed of all right, claim, or equity of redemption in the said preimses” and for judgment and execution against defendant Hartley and also for deficiency judgment should any deficiency remain after applying the proceeds of the sale of said premises; that the plaintiff or any party to the suit may become a purchaser at said sale to whom a deed shall be executed and the purchaser let into possession and for “such further relief in the premises as to the court may seem proper.”
Defendant Trainor answered that the deed of October 5, 1910, from Hartley to him was as security for the payment to him by Hartley of a certain sum which has been fully paid, and that he was ready and willing to reconvey the property to Hartley but that the latter requested him to make and execute a deed of said land to defendant Bethel, which Trainor did, on January 16, 1911.
Defendant Bethel filed a general and special demurrer to the original complaint, which was overruled and he answered the original complaint, admitting many of its averments. He denied that plaintiff was obliged to discharge the Harlow mortgage and alleged that the Harlow note and mortgage were fully satisfied and discharged, on December 5, 1910; admitted the execution of the deed by Morris and his wife, on October 10, 1910, but denied that it was for the purposes of correction only; denied that by paying the Harlow mortgage plaintiff became subrogated and alleged that the two Hartley notes of seven hundred and fifty dollars and eight hundred and fifty dollars were fully discharged, on October 10, 1910.
The court found that all the allegations of the first cause of action set forth in the amended complaint are true; also all the allegations of the third and fourth causes of action; also that all the allegations of the answer of defendant Trainor are true. The court also found that defendant Bethel did not *68purchase the land for a good and valuable consideration; that the deed made by Trainor to him, January 16, 1911, was so executed by him at Hartley’s request as security for the sum of one hundred and fifty dollars “then and there paid by defendant P. J. Bethel to extinguish a debt then due from defendant A. P. Hartley to defendant W. E, Trainor. That defendant P. J. Bethel took said deed from defendant W. E. Trainor with notice of all encumbrances subsisting upon the land in controversy at the time defendant A. P. Hartley executed his deed to the said land to said W. E. Trainor on the 5th day of October, 1910.”
In defendant Bethel’s answer it was alleged that neither the note nor the mortgage executed by plaintiff and his wife to Susie Harlow for two thousand dollars, on November 16, 1909, is “owing or unpaid from defendant P. J. Bethel”; on the contrary, that both said note and mortgage were fully paid, satisfied, and discharged, on December 5, 1910. The court found that these averments of Bethel’s answer were not true “except-that the mortgage therein mentioned was satisfied of record by plaintiff as an inferior lienor.” The court further found that there is due and owing plaintiff from defendant Hartley the sum of two thousand dollars and interest, upon the promissory note of plaintiff and his wife to Susie Harlow, on November 16, 1909, secured by mortgage upon parcel “A” of said land; also the sum of seven hundred and fifty dollars upon said note of defendant Hartley executed to plaintiff September 30, 1910, secured by mortgage executed by said Hartley on parcel “A” of said land; also the sum of eight hundred and fifty dollars and interest upon said note of defendant Hartley executed to plaintiff on September 30, 1910, secured by mortgage on parcel “B” of said land; that it is necessary to appoint a commissioner for the sale of said premises and that said commissioner be directed to sell parcel “B” subject to the mortgage lien of B. P. McIntyre and Lulu Speer, and from the moneys realized at such sale to pay to plaintiff the sum of $1,072.25, with costs and interest; that such commissioner also sell parcel “A” and out of the moneys realized from such sale, after deducting expenses thereof, to pay to plaintiff the sum of $3,245.20, and if the amount realized from said sale shall be insufficient to pay said sums, then plaintiff may have judgment for any deficiency remaining. *69As conclusion of law the court found that plaintiff is entitled to judgment for the sum of $4,317.35.
The original complaint was filed January 18, 1911, to which defendant Bethel filed a general and special demurrer, on February 4, 1911. The court overruled the demurrer, on April 10, 1911, and, on October 27, 1911, defendant Bethel filed an answer to plaintiff’s original complaint. The cause came on for trial February 23, 1912, “and the same was continued to the 27th day of February, 1912, and upon completion thereof, upon motion of plaintiff’s counsel, the court allowed the complaint herein to be amended to conform to proofs adduced at the trial.” On March 8, 1912, plaintiff served and filed his amended complaint and, on March 14, 1912, the court made its findings and filed its judgment and, on March 15, 1912, said judgment was duly entered. On March 28, 1912, defendant Bethel served and filed a motion to strike the amended complaint from the files, which purports to have been “based upon the pleadings and records in the action and the affidavit of James D. Meredith, attorney for Bethel, and upon oral testimony to be adduced at the hearing of said motion.” The record contains no affidavit .or testimony in support of the motion. On May 13,1912, this motion and the settlement of the bill of exceptions came on to be heard. The motion was denied and appellant given to May 20, 1912, “to prepare and serve a statement on motion for a new trial and the settlement of bill of exceptions.” No answer to the amended complaint was filed, although it was served and filed six days before findings and judgment, and no stipulation appears that the answer to the original complaint should be deemed an answer to the amended complaint. The case, however, seems to have been tried upon the theory that the facts presented by the amended complaint, except as admitted, were denied substantially as appeared in appellant’s answer to-the original complaint, and we shall so treat the record. We cannot, however, so treat the demurrer. It is well settled that an amended complaint supersedes the original complaint and furnishes the sole basis of plaintiff’s cause of action. If defendant, Bethel, had desired to avail himself of objections, other than to the sufficiency of the amended complaint to state a cause of action, he should have renewed his special demurrer. We are satisfied that a cause of action is stated in both complaints.
*70Upon the merits, appellant’s position is: 1. That the deed of plaintiff and his wife to Hartley, on October 10, 1910, “absolutely released and discharged the two mortgages of Hartley to Morris (one for $750.00 and one for $850.00) and merged them in Hartley and had the operative effect of absolutely releasing and discharging said two mortgages of A. P. Hartley to Isidor P. Morris,” and that appellant took the title freed from these mortgages; and, 2. That Morris was a mere volunteer or intermeddler when he paid the Susie Harlow mortgage debt and caused the mortgage to be satisfied, on December 5, 1910, and that when Trainor, January 16, 1911, conveyed the land to appellant the latter took the title with no encumbrance upon the premises except the McIntyre and Speer mortgage. On the face alone of the records of deeds and mortgages this contention finds support. And appellant’s claim at the trial was and is here that he made the purchase upon such notice only as these records imparted. There was testimony, however, which the court accepted and which tended to show that Trainor took his deed to secure two hundred and fifty dollars loaned by him to Hartley, one hundred dollars of which Hartley paid him and one hundred and fifty dollars was paid him for Hartley by appellant and that Trainor conveyed to appellant to secure the latter in paying Trainor this amount and that there was no other consideration for Trainor’s deed to appellant. There was evidence that when Morris and wife made their deed to Hartley, five days after Morris had deeded the land to Hartley, it was for the sole purpose of conveying the wife’s interest and that it was well understood by Hartley that the premises remained subject to the mortgages given by him and the two mortgages of two thousand dollars each given by Morris and wife; that the consideration was six thousand one hundred dollars, of which Hartley paid five hundred dollars at the time of his purchase, the balance being made up of these four mortgages. There was evidence that when Morris paid the Harlow mortgage it was to protect the mortgages given him by Hartley, and there was evidence from which the court was justified in finding that appellant had notice of these transactions and that when he received his deed from Trainor he knew in what capacity Trainor held the title and also knew that Hartley and Morris treated all these mortgages as subsisting liens and that appellant in fact took the land subject to these liens. *71Appellant’s contention is that Morris ceased to be a lienor because of the conveyance of himself and wife to Hartley, October 10, 1910, and therefore had no right to be subrogated under the Harlow mortgage and had no such relation to the land as would authorize him to pay off the Harlow mortgage under sections 2903 and 2904 of the Civil Code. These sections confer upon a person having an interest in property, subject to a lien, the right to redeem from the lien and by such redemption he becomes subrogated to all the benefits of the lien; and further provides that one who has a lien inferior to another upon the same property has a right to redeem the property, in the same manner as its owner might, from the superior lien; and “to be subrogated to all the benefits of the superior lien, when necessary, for the protection of his interests, upon satisfying the claim secured thereby.” (See, also, Civ. Code, sec. 2876.) The evidence showed that'plaintiff was endowed with these rights. - Appellant’s various points in challenging the findings rest upon the assumption that he had no notice of any transaction other than shown by the records of deeds and mortgages and that he purchased the property outright and unconditionally with such notice only. But there was evidence sufficient to show that this, as the court found, was not true, and that he in fact took his conveyance from Trainor to secure the one hundred and fifty dollars paid Trainor for Hartley’s benefit, and that he then knew all the facts upon which plaintiff bases his rights in the action as herein above set forth. We think there were sufficient averments in the amended complaint on which to base the findings. We are of the opinion that the learned trial judge was fully warranted by the evidence in making his findings of fact and conclusions of law.
Some objection is made of the form of the judgment, and it must be admitted that in some respects it is open to appellant’s criticism. For example, it adjudges that the land “be and hereby is declared a valid lien for the payment to plaintiff,” etc. And it is claimed that “nowhere is it decreed and adjudged that any of the mortgages set forth in the complaint are a lien upon the premises involved, or that the plaintiff is entitled to the foreclosure of such a lien on the premises involved. ’ ’
Section 2931 of the Civil Code provides that “a mortgagee may foreclose the right of redemption of the mortgagor in the *72manner prescribed by the Code of Civil Procedure.” Section. 726 of the latter code prescribes no form for the judgment. The principal object of the proceeding is to cause a sale of the encumbered property and the application of the proceeds of sale to the payment of the debt secured thereby as in the section directed. The judgment describes the property and directs its sale “or so much thereof as may be sufficient to raise the amount due to the plaintiff with costs of suit, ’ ’ etc.; appoints a commissioner to conduct the sale and gives specific directions as to the application of the proceeds to pay the amounts due, which are specifically given, and declares that all the defendants and all persons claiming under them or having liens subsequent to plaintiff’s liens and who have acquired any estate or interest in said premises subsequent to the filing of the notice of the pendency of the action, “be forever barred and foreclosed of and from all equity of redemption, ’ ’ etc. The judgment seems to be a sufficient compliance with the statute to effectuate its object.
The judgment is affirmed.
Hart, J., and Burnett, J., concurred.
Petition for a rehearing of this cause and of Morris v. Hartley, (Civ. No. 1271), post, p. 804, [146 Pac. 78] were denied by the district court of appeal on December 31, 1914, and the following opinion then rendered thereon: