postgresql7.1
select * from card_percent
where ref_community = :community_id
order by percent desc
select email as teacher_email from acs_users_all where user_id = :my_user_id
select email as student_email from acs_users_all where user_id = :user_id
update card set
comm_teacher = :comment
where ref_community = :community_id and
card_id = :card_id
update card set
address = :user_address,
phone1 = :user_phones
where ref_community = :community_id and
card_id = :card_id
update card set
comm_student = :student_comment
where ref_community = :community_id and
card_id = :card_id