This case may be stated in this way: The defendant O’Oonnell entered into a general contract with the other defendants, Myers and wife, for the erection of two residence buildings and a boiler house on certain lots in Kansas City. The plaintiffs contracted with O’Oonnell to perform all the brick work on said buildings as called for by the plans and specifications for $2,979. The plaintiffs’ claim is that they did the work and furnished the materials for said improvement according to contract for which they received all of the contract price except the sum of $416, for which latter amount they filed their statutory lien against the property upon which the improvement was erected. This suit was brought against the contractor and owners of the property to foreclose the lien.
The property-owners filed an answer which put in issue the existence of the plaintiffs’ alleged lien. It also contained *5allegations to the effect following: “That on the seventh day of December, 1899, a suit was filed in the circuit court of Jackson county, Missouri, at Kansas City, by Ered J. Dwyer et al., against the plaintiffs and defendants in this action, wherein they claim and seek to enforce against the above described property of these defendants an alleged lien for brick and other material furnished to the plaintiffs under subcontract with the defendant, Matt. O’Connell, and a lien therefor was filed by said Dwyer et al., in the office of the clerk of the circuit court of Jackson county, Missouri, at Kansas City, against the above-described property. It is further alleged in said petition in the Dwyer ease that the plaintiffs, James W. Flanagan and August Flanagan, are indebted for the brick and the materials aforesaid therein alleged to have been used on the 'buildings of these defendants aforesaid in the sum of $111.50, together with interest thereon, from the second day of September, 1899, at the rate of six per cent per annum.” These allegations were followed with a prayer that the court stay this suit and not to allow plaintiffs to take any further steps therein until they satisfied the alleged lien of said Dwyer, or until the same be declared invalid.
There was a trial, at the inception of which the court on the application of the property-owners heard the affirmative allegations of the answer and the proofs submitted in support thereof and then declined to make an order staying the prosecution of the suit. After disposing of this preliminary matter the case was tried by the court on the merits which resulted in judgment for plaintiffs. The property-owners who have appealed assign as error the action of the court in denying their motion for a stay of the prosecution of the suit. They contend that under section 1223, Kevised Statutes 1899, the stay should have been ordered.
This section provides that when a lien shall be filed under *6this article — article 1, chapter II — by any person other than a contractor, it shall be the duty of the contractor to defend any action brought thereon at his own expense; and that during the pendency of such action, the owner may withhold from the contractor the amount of money for which such lien shall be filed; and in case of judgment against the owner or his property upon the lien, he shall be entitled to take from any amount due by him to the contractor, the amount of such judgment and costs; and, if he shall have settled with the contractor in full, he shall be entitled to recover back from the contractor any amount so paid by the owner for which the contractor was originally the party liable. Manifestly, this section has no application in this case. The contractor mentioned therein is one in privity with the property owner, or else, how could “the property-owner withhold from the contractor the amount of the lien,” or when there is judgment, take from any amount due by him to the contractor from the amount of the judgment. There is no privity — no contractual relations — between the plaintiffs, who were subcontractors, and the property-owners.
Undoubtedly, courts of general jurisdiction have the power tó stay proceedings in any case pending before them to prevent an undue advantage or injustice. Nor can it be doubted that where a subcontractor and materialman both have lien claims, as they may under the statute, for the same materials furnished by them for a building, that the property-owner ought not to he required to discharge both of said liens, or, which is the same thing, pay twice for the same material. But if both liens are valid then he should discharge one or the other of them.
The question raised by the property-owners’ motion in the trial court was whether or not even if the validity of both the lien of the subcontractor and that of the materialman were disputed, the court should stay the prosecution of the subcontractor’s suit to foreclose until that of the materialman was *7finally decided. At the time the motion was filed it remained, to be determined whether either lien was valid. If the property-owners had admitted that the lien of the subcontractor was valid, then it is easy to see the danger they would be in should the lien of the materialman be upheld. In such case a court would not hesitate to stay the suit foreclosing the lien of the former until that of the latter should be determined. This would be done to protect the property-owners against a threatened injustice. But where, as here, the validity of the subcontractor’s lien is put in issue by the property-owners, no reason is seen why a suit to foreclose such lien should be stayed until that to foreclose the materialman’s lien should be finally determined.
If the materialman’s lien should be declared invalid, then there would be no occasion for staying the prosecution of the suit of the subcontractor; but if the validity of both liens should be upheld and judgment of foreclosure be given, the court could then interfere, for it has entire control over its process and in its discretion it could grant or stay the execution in each case accordingly as the circumstances should seem to it to equitably require. This is one of the common-law powers of the court which may be exercised in an almost infinite variety of circumstances in order to promote the ends of justice. Phillips v. Evans, 64 Mo. 24; Eaton v. Railway, 41 Fed. Rep. 421; Sawin v. Bank, 2 R. I. 383; Steere v. Stafford, 12 R. I. 131; Robinson v. Yon, 8 Fla. 355; Commonwealth v. Magee, 8 Pa. St. 240. After judgment the court could make such orders in respect to the issue of execution as it would seem right and, proper under the particular circumstances.
If the property-owner should be compelled to discharge either or both of said judgments, no reason is seen why, under the provisions of section 4223, ante, they may not, if they have paid the contractor in full, as we may infer to be the fact, re*8cover of such contractor the amount thereof. If this suit were by the contractor instead of the subcontractor the cited case of Macomber v. Bigelow, 123 Cal. 532, would be an authority upholding the property-owners’ contention. In this connection, we may say that an examination of the several other cases cited by counsel for the property-owners has not convinced us that they lend any support to his -contention. No fault has been found by us with the action of the court in denying the order to stay the prosecution of the suit.
The court supplemented the judgment with an order which in substance was that the amount of any payment made on the judgment in favor of the materialman by the defendants therein, or by any one of them, should be credited on the judgment, or on any execution issued thereon, in favor of the subcontractors against the contractor and property-owners and also credited on the judgment in favor of the -material man against the subcontractors and the property-owners. It is difficult to see how the property-owners could be injured by this order. "The making of it was but the exercise of a discretionary power inherent in the court. It could be made, as it was, without reference to the state of the pleadings.
The property-owners contend that the work done and the materials furnished by the subcontractors was under two separate and distinct contracts requiring two liens to be filed. Where buildings are erected under one general contract on contiguous lots the lienor is not required by the statute — Revised Statutes 1889, section 6129 — to file separate liens for each building (Walden v. Robertson, 120 Mo. 38), but he may file one lien on both. Kick v. Doerste, 45 Mo. App. 134. The general rule is, that where two distinct contracts are in fact made as for different parts of the same work, the work done under each contract must be entire of itself. But where work done or materials furnished all go to the same general purpose, as the build*9ing of a house or block of houses and buildings appurtenant thereto, though such work done or materials furnished were not contracted for on the same day or at the same time, yet, if they were done and furnished as parts of a general improvement of the property, all of such work and materials may be regarded within the meaning of the mechanic’s lien statute as done and furnished under one contract and may be included in one lien account.
Kearney v. Wurdeman, 33 Mo. App. 447, was a suit on a mechanic’s lien. At the trial the defendant interposed - a demurrer to the evidence on the ground that the evidence disclosed that the work embraced in the lien account had been contracted for and done under two separate and distinct written contracts made thirteen days apart. It was said by Judge Thompson in the course of his opinion, that “it is argued for this reason the work done under these two contracts could not be embraced in one lien and enforced in a single action. * * * It is immaterial under how many contracts the work was done provided all the contracts were between the same parties and the lien was filed within the 'statutory time.” This case was cited with approval by the Supreme Court in Press Brick Co. v. Quarry Co., 151 Mo. loc. cit. 509. In this latter ease an instruction had been given for defendant in the trial court to the effect that if the brick described in the first count of the petition was furnished under one contract and the brick machine mentioned in the second count under a separate and distinct contract, that then the two matters formed separate and distinct accounts for which separate liens should be filed. In disposing of the case on the appeal the court say that the instruction was erroneous. The brick and brick machine were not contracted for on the same day but they were furnished as parts of one general improvement of the property, that they 'were all necessary parts of one whole plant and were under a *10common roof, and the whole and all its parts were constructed at substantially the same time and the business of making dry préssed brick could not be carried on until the whole plant was completed. They must all be regarded as having been furnished under a single contract within the meaning of the mechanic’s lien statute.
In Page v. Bettes, 11 Mo. App. 366, we quoted with approval the following excerpt from section 229 of Phillips on Mechanics’ Liens, to-wit: “When work or material is done or furnished, all going to the same general purpose, as the building of a house or any of its parts, though the work be done or ordered at different times, yet if the several parts form an entire whole or are so connected together as to show that the parties had it in contemplation that the whole should form but one and not distinct matters of settlement, the whole account must be considered as a unit or as being but a single contract.” In Kern v. Pfaff, 44 Mo. App. 35, it was said: “It is permissible to embrace in an account, filed as a lien, items for work on the sanie building under different contracts with the owner.” And to the same effect is Bruns v. Braun, 35 Mo. App. 337; Lumber Co. v. Nelson, 71 Mo. App. 116, and Grace v. Nesbitt, 109 Mo. 9.
Whether the work was done or performed or the materials furnished under one entire or general contract or under distinct contracts is necessarily a question for the jury and not for the court. Page v. Bettes, supra. And the finding of the trial court when sitting as a jury, where there is any substantial evidence to support it, is conclusive on the appellate court.
It stands admitted by the defendant’s answer that the original contractor erected for the property-owners the two residence buildings and brick boiler house on certain contiguous lots under one general and entire contract. It is disclosed by the evidence that on the same day and on the same sheet of *11paper the subcontractors made a proposition to the contractor to complete the brick work on the houses of the property-owners according to the plans and specifications for $2,704, and that on the boiler house for $275. The contract required that the brick work on the houses, and the boiler house used in connection therewith, be done in conformity to certain plans and specifications and the subcontractors proposed to the contractor to perform that work according to such plans and specifications for $2,979. The subcontractors testified that they figured first on the main buildings and determined the amount that they could do that work for, and then on the boiler house, and in like manner determined what they could do. the brick work on that for. The two propositions were accepted and formed the basis of the subcontract under which the work was performed. It appears that the understanding of the transaction by both the contractor and subcontractor was that the latter was to do the work under one contract. The manner in which the payments were made by the contractor to the subcontractors tend to show this. Phillips on Mechanics’ Liens, section 326. This amounted to a practical construction of the transaction by the parties themselves which is entitled to consideration in determining whether the work was done under one or two contracts. The subcontractors evidently understood that they had but one contract when they filed their lien account. There was at least some evidence tending -to show that the parties did not intend to enter into two contracts for doing the work. The question of whether there was one or two contracts depends largely upon the intention of the parties as determined from the language and subject-matter. The finding of the court, therefore, that the work was done under one contract, is conclusive on us.
But even if the two propositions and the acceptance thereof constituted two separate contracts for doing the work and furnishing the materials, yet as such contracts were between the *12same parties and, too, as the evidence shows that such work and materials all went into one general improvement of the property, we must think that under the principles of the cases already referred to, such work and materials should be regarded as furnished under one contract within the meaning of the mechanics’ lien statute. If the work and materials were furnished under one contract, it is clear that the lien was filed within the time required by statute,
It results from the foregoing considerations that the judgment of the circuit court will be affirmed.
Broaddus, J. concurs; Ellison, J., concurs in result.