
    Argued and submitted November 17, 1982,
    affirmed in part, reversed in part and remanded March 30, 1983
    R & R EXCAVATING CO., INC., Appellant, v. OLIVE TREE HOMES, INC. et al, Respondents.
    
    (39 624; CA A22916)
    660 P2d 1092
    D. Michael Mills, Salem, argued the cause for appellant. With him on the brief was Mills & McMillin, Salem.
    
      Larry I. Evans, Portland, waived appearance for respondent Olive Tree Homes, Inc.
    Leonard J. Kovac, Jr., Milwaukie, argued the cause for respondents David G. and Zoe E. Lewis. On the brief was Roger P. Mundorff, Milwaukie.
    Before Buttler, Presiding Judge, and Warren and Rossman, Judges.
    BUTTLER, P. J.
   BUTTLER, P. J.

Plaintiff, a subcontractor, brought this proceeding to foreclose a mechanic’s lien against defendants Lewis, the owners of the liened property, and defendant Olive Tree Homes, Inc., the prime contractor. Each defendant denied the lien claim and asserted separate counterclaims for damages allegedly caused by plaintiffs negligence in performing the work it was to do under its subcontract. The trial court dismissed plaintiffs lien claim and gave each of the defendants a judgment for attorney fees and costs as the prevailing parties on that claim. Separate parts of the same judgment order provided for: judgment for plaintiff against all defendants for $2,093.50, plus interest and costs, apparently for the reasonable value of the work plaintiff performed that remained unpaid; judgment for defendants Lewis against plaintiff for $3,984, plus costs; denial of defendant Olive Tree Homes’ counterclaim; and judgment for costs in favor of Olive Tree Homes.

Because plaintiff did not designate a transcript of the proceedings as part of the record on appeal, we are able to consider only the errors claimed in awarding defendants attorney fees and costs and in not awarding attorney fees to plaintiff.

It is apparent that the trial court, not illogically, broke the proceedings down step-by-step. It first disposed of the lien claim in favor of defendants. Having done so', it then applied ORS 87.060(4) literally in awarding attorney fees and costs to defendants as the prevailing parties in the lien claim. However, since Betz Construction v. Peterson, 47 Or App 333, 614 P2d 1184, rev den 289 Or 677 (1980), we have read ORS 87.060 as a whole and, because ORS 87.060(2) authorizes the court to decide all well-pleaded issues in lien foreclosure suits, whether or not the lien is allowed, we have treated the ultimate outcome as determining which of the parties, if any, is entitled to costs and attorney fees.

In Betz, the plaintiff lost on its lien claim, but prevailed on its quantum meruit claim. Because it did not prevail on its lien claim, the plaintiff was not entitled to attorney fees, although it was entitled to costs by virtue of its judgment against the defendants, who contended that they were entitled to attorney fees, because they had prevailed on the lien claim. We held that they were not, because they were not entitled to costs as the prevailing party, a prerequisite in any case to entitlement to attorney fees.

In Welch v. Webb, 47 Or App 771, 615 P2d 391 (1980), the plaintiffs’ lien claim was reversed on appeal, but we pointed out that the trial court had made findings as to the reasonable value of the work done by the plaintiffs and that the record was sufficient to permit the trial court to make findings on the defendant’s counterclaim. We remanded the case for the trial court to make findings regarding the extent to which the plaintiffs’ work had benefitted the defendant and the amount, if any, of the defendant’s offsetting damages. As things then stood, we pointed out that neither party was entitled to attorney fees, citing Betz.

The latest case involving this question is King v. Suniga, 54 Or App 267, 634 P2d 812 (1981). There, the plaintiffs failed in their lien claim, so they were not entitled to attorney fees. They prevailed on their quantum meruit claim in an amount in excess of the amount that the defendant had tendered into court, so they were the prevailing parties entitled to costs. We pointed out, albeit in dicta, that if the defendant had tendered an amount sufficient to pay the plaintiffs the amount awarded them, he would have been entitled to costs as the prevailing party and would also have been entitled to attorney fees as part of costs under ORS 87.060(4), because he had prevailed on the lien claim.

Here, plaintiff lost on the lien claim; therefore, it is not entitled to attorney fees, even if it were entitled to costs. Defendants Lewis prevailed on the lien claim, and their judgment against plaintiff on their counterclaim exceeds plaintiffs judgment against them. Accordingly, they are the prevailing parties entitled to costs and, because they also prevailed on the lien claim, they are entitled to attorney fees under ORS 87.060(4). Olive Tree Homes is not a prevailing party against plaintiff in the overall proceeding, although it prevailed on the lien claim, and it is not entitled to costs or attorney fees. Because plaintiff obtained a judgment against Olive Tree Homes, it is entitled to costs against that defendant.

Affirmed in part; reversed in part; and remanded for entry of a new judgment omitting award of attorney fees and costs to defendant Olive Tree Homes, Inc. 
      
       ORS 87.060 provides:
      “(1) Suits to enforce the liens created by ORS 87.010 shall be brought in the circuit courts, and the pleadings, process, practice and other proceedings shall be the same as in other cases.
      “(2) In suits to enforce the liens created by ORS 87.010, the court shall allow or disallow the lien. If the lien is allowed, the court shall proceed with the foreclosure of the lien and resolve all other pleaded issues. If the lien is disallowed, and a party has made a demand for a jury trial as provided for in subsection (3) of this section, the court shall empanel a jury to decide any issues triable of right by a jury. All other issues in the suit shall be tried by the court.
      
        “(3) A party may demand a trial by jury of any issue triable of right by a jury after the lien is disallowed, if that party serves a demand therefor in writing upon the other parties at any time prior to commencement of the trial to foreclose the lien. The demand shall be filed with the court. The failure of a party to serve a demand as required by this subsection shall constitute a waiver by the party of trial by jury. A demand for trial by jury made as provided in this subsection may not be withdrawn without the consent of the parties.
      “(4) When notice of intention to commence suit to foreclose the lien has been given, pleaded and proven as provided for in ORS 87.057, the court, upon entering judgment for the lien claimant, shall allow as part of the costs all moneys paid for the filing or recording of the lien and all moneys paid for title reports requiring for preparing and foreclosing the lien. In suits to enforce a lien created by ORS 87.010 the court shall allow a reasonable amount as attorney fees at trial and on appeal to the prevailing party, except as provided in ORS 87.039(2) and 87.057(3).
      “(5) In case the proceeds of any sale under ORS 87.001 to 87.060 and 87.075 to 87.093 are insufficient to pay all lienholders claiming under such statutes, the liens of all persons shall be paid pro rata. Each claimant is entitled to execution for any balance due the claimant after the distribution of the proceeds, and that execution shall be issued by the clerk of the court, upon demand, after the return of the sheriff or other officer making the sale showing the balance due.
      “(6) All suits to enforce any lien created by ORS 87.010 shall have preference on the calendar of the court over every civil suit, except suits to which the state is a party, and shall be tried by the court without unnecessary delay. In such suits, all persons personally liable, and all lienholders whose claims have been filed for record under the provisions of ORS 87.035, shall, and all other persons interested in the matter in controversy, or in the property sought to be charged with the lien, may be made parties; but persons not made parties are not bound by the proceedings. The proceedings upon the foreclosure of the liens created by ORS 87.010 shall, as nearly as possible, conform to the proceedings of a foreclosure of a mortgage lien upon real property.”
     
      
       The trial court awarded costs to plaintiff against all defendants; although it was error to have awarded costs against defendants Lewis, that question is not before us.
     