sql查询
This commit is contained in:
parent
2fb6852086
commit
5880a12290
|
@ -169,4 +169,8 @@ module OrganizationsHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def org_teacher_resource_count user
|
||||||
|
results = Attachment.find_by_sql("SELECT * FROM `attachments` where author_id = #{user.user_id};")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="block-slice"></div>
|
<div class="block-slice"></div>
|
||||||
<div class="teacher-social-block">
|
<div class="teacher-social-block">
|
||||||
<div class="block-num">8000</div>
|
<div class="block-num"><%= org_teacher_resource_count(org_teacher) %>8000</div>
|
||||||
<div class="block-title">资源数</div>
|
<div class="block-title">资源数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue