select count(*) from cr_items where item_id = :item_id
select c.item_id
from acs_rels a, cr_items c
where a.object_id_two = c.item_id
and a.object_id_one = :user_id
and a.rel_type = 'user_portrait_rel'
update cr_items
set name = :item_name,
storage_type = :storage_type
where item_id = :item_id
select count(*) from cr_items where item_id = :item_id
select count(*) from cr_items where item_id = :item_id
update cr_items
set name = :item_name,
storage_type = :storage_type
where item_id = :item_id
select count(*) from cr_items where item_id = :item_id
update cr_items
set name = :item_name,
storage_type = :storage_type
where item_id = :item_id
select eg.grade_id
from evaluation_tasks est, evaluation_grades eg, cr_items cri
where est.task_id = :task_id
and est.grade_item_id = eg.grade_item_id
and cri.live_revision = eg.grade_id
select et.task_name, et.number_of_members, et.task_item_id
from evaluation_tasks et
where et.task_id = :task_id
$sql_query
select count(*) from cr_items where item_id = :item_id
select count(*) from cr_items where item_id = :item_id
select eg.grade_name,
et.task_name
from evaluation_grades eg,
evaluation_tasks et,
cr_items cri
where et.task_id = :task_id
and et.grade_item_id = eg.grade_item_id
and cri.live_revision = eg.grade_id
select lob
from cr_revisions
where revision_id = :revision_id
select et.task_id,
et.weight as task_weight
from evaluation_tasksi et
where et.grade_item_id = (select item_id from cr_revisions where revision_id=:grade_id)
and content_revision__is_live(et.task_id) = true
select grade_id, weight
from evaluation_grades
update evaluation_tasks set points=:points
where task_id=:task_id
select task_id from evaluation_tasks
update evaluation_tasks set perfect_score=:perfect_score
where task_id=:task_id
select task_id from evaluation_tasks
update evaluation_tasks set relative_weight=:relative_weight
where task_id=:task_id
select task_id from evaluation_tasks
update evaluation_tasks set forums_related_p=:forums_related_p
where task_id=:task_id