The opinion of the court was delivered by
Wertz, J.:Plaintiff (appellee) Charles Renton brought this action against W. H. and Clara Franzen, defendants (appellants), for the recovery of money under two budding contracts and to have the judgment declared a lien on defendants’ property.
Defendants have appealed from the order of the trial court overruling their demurrer to plaintiff’s petition on the ground it failed to state a cause of action.
The pertinent facts alleged in the petition are as follows:
The defendants were the owners of the described property; that plaintiff was a carpenter; that on the 18th of December, 1960, plaintiff and defendants entered into a contract to remove the north portion of defendants’ residence and rebuild two rooms thereon at an agreed price of $4,600; that in the performance of this contract, in tearing down a portion of the existing residence, it was discovered that defendants’ entire residence was infested with termites; that in January, 1961, defendants employed plaintiff to tear down and demolish the remainder of the residence property and to reconstruct the same; that the plaintiff was to receive for his services in the reconstruction of the residence the sum of $2 per man hour of time required for said reconstruction, plus the actual cost of all material required; that on February 1 defendants paid plaintiff the sum of $1,200 on the contract, and that during that same month orally employed plaintiff to remodel and repair the garage at the agreed contract price of $265; that plaintiff and his employees proceeded to perform the contract and work as above set forth and did complete said contract on June 10; that during the process of said work the defendants inspected the progress of the same; and that defendants took possession of the property as completed by plaintiff on June 10.
Plaintiff further alleged he constructed said dwelling and performed all work in accordance with the contracts alleged and duly performed all the conditions on his part to be performed; that defendants neglected and refused to pay plaintiff for any part of the contract prices of the dwelling and garage with the exception of the $1,200, and that there is now due and owing to the plaintiff from defendants the sum of $9,224.35.
*110Plaintiff also alleged that a verified itemized statement of the materials and labor required by plaintiff in performing the contracts was attached to the petition and that within four months after the last item of labor and material was performed and furnished the plaintiff filed his verified lien statement containing the contracts of employment heretofore mentioned.
The plaintiff in his prayer asked for judgment against the defendants for the sum of $9,224.35 with interest and that the same be adjudged a lien on the property. Plaintiff also prayed for determination of the amount, validity and priority of the claims of all other defendant lienholders and for other equitable relief.
The appellants’ appeal is based on the theory that the mechanic’s lien statement is defective, not in compliance with the statute (G. S. 1949, 60-1402), and therefore the petition failed to state a cause of action against these defendants.
It may be stated this court received no help from the parties on the real question involved in this appeal, i. e., Does the petition state a cause of action?
At the outset it may be reiterated that when a petition sufficiently alleges a cause of action on any theory a general demurrer thereto cannot be sustained. Moreover, the mere fact that a petition seeks to recover more or different relief from that for which a plaintiff may be entitled does not make the petition demurrable if it otherwise states a cause of action. (Finkenbinder v. Dreese, 188 Kan. 544, 363 P. 2d 465, and cases therein cited; Coolbaugh, Trustee v. Gage, 182 Kan. 145, 149, 319 P. 2d 146.)
Other settled rules of long standing in this jurisdiction are: If a cause of action is stated in plaintiff’s petition, what is prayed for is not always of importance; the prayer of a petition is merely the plaintiff’s idea of relief to which he is entitled, it is not a part of the statement of the cause of action; if a cause of action is sufficiently stated and sufficiently proved, the court will adjudge and decree the proper relief which may or may not conform in whole or in part to the relief prayed for in the petition; and the allegations of the petition rather than the prayer for relief determine the nature of the action brought. (For authority for the foregoing rules of law see Finkenbinder v. Dreese, supra, p. 546, and cases therein cited.)
In the instant case the petition clearly alleged a cause of action for the recovery of money on three separate contracts; that the contracts had been performed; that tire money was due from the defend*111ants and they refused to pay; and that plaintiff was entitled to judgment for $9,224.35 with interest thereon. It is elementary that such allegations constitute an action for the recovery of money on contract. The effect of the argument in appellants’ brief is not to demur to the petition on any of the grounds set forth under G. S. 1949, 60-705, but an attempt to strike the mechanic’s lien statement from the petition. In other words, they are only demurring to a part of the consequential relief sought by the plaintiff’s petition and not that it fails to state a cause of action on any theory. We said in Krey v. Schmidt, 170 Kan. 86, 89, 223 P. 2d 1015, that the general rule seems to be that a demurrer will not lie to a single paragraph of a petition on the ground that it does not state facts sufficient to constitute a cause of action if the pleading as a whole states facts sufficient to constitute a cause of action, and a demurrer to a part of a cause of action or part of a petition will only be entertained when the imperfect part is so material that, being eliminated, it leaves the pleading without a good cause of action.
From an examination of the record it is apparent the demurrer filed by the defendants was nothing more than a motion to strike the mechanic’s lien statement. Being treated as such, the motion to strike is addressed to the sound discretion of the court and ordinarily refusal to grant it will not be disturbed unless it clearly appears that the trial court’s discretion has been abused. No such showing is made here. (Krey v. Schmidt, supra, p. 90.) Even striking the mechanic’s lien statement would not determine the action, as the plaintiff has a right to recover money due under the alleged contracts. Assuming, without deciding, that the mechanic’s lien statement is defective, still the plaintiff would be entitled to a money judgment under the allegations of his petition notwithstanding. (Bailey v. Norton, 178 Kan. 104, 111, 283 P. 2d 400.)
This court is not passing upon the sufficiency of the mechanic’s lien statement attached to the petition. In the very nature of its character and importance the question presented is one that should not be determined in the absence of a full disclosure of all pertinent facts. It would have been far better, and a much safer practice, to have joined issues by proper pleadings and to have tried the case on its merits rather than to endeavor to obtain a ruling in the manner followed by defendants. In practical effect, defendants attempt to secure a ruling from this court in advance of *112trial in the absence of a full disclosure of all material facts. We are in no position to make such binding adjudication. (Kendall v. Elliot, 177 Kan. 630, 281 P. 2d 1088.)
An examination of the record discloses that the trial court did not err in overruling the demurrer to plaintiff’s petition on the ground that it failed to state a cause of action. The judgment is affirmed.