I have to remove data and count for facebbok like notification. there are 3 tables from where i need to remove data
1st company table where i remove company id.
2nd table is mark_question where i mark the question as read/unread, fav/unfav, notification status
3rd is the forum topic questions where the data regarding the questions asked
1st query is removed on the result of a query where i get a set of values.
select *
from gl_mark_ques
where user_id =".$this->session->userdata('user_id')." and
vs_ques_status=0
after this i get a set of id’s these id’s should not be present in the next query i execute
SELECT uc.*,count(mq.vs_ques_status)
from gl_user_comp as uc
inner join gl_mark_ques as mq
on uc.user_id=mq.user_id and
uc.comp_id='$comp_id'
where mq.user_id<>".$this->session->userdata('user_id')." and
mq.new_ques_id!=2 and
mq.vs_ques_status=1
mq.new_ques_id=2 <– here i need to add the id’s i got from first query. There may be only one id or multiple id’s. How do i integrate this kindly help, thanks in advance
1 Answer