0

I have two columns one for users(including student and teacher) and other for teacher_subscription. I want to select users(teacher) which are not followed by current user(for e.g user1).

i tried this..

select users.uid,acctype,uname from users where uid!=1 && acctype='Teacher'&& users.uid not in (select tid from teacher_subscription where uid!=1&&tid!=users.uid)

but not getting desire results

I have two columns one for users(including student and teacher) and other for teacher_subscription. I want to select users(teacher) which are not followed by current user(for e.g user1).

i tried this..

select users.uid,acctype,uname from users where uid!=1 && acctype='Teacher'&& users.uid not in (select tid from teacher_subscription where uid!=1&&tid!=users.uid)

but not getting desire results

user3418795
  • 61
  • 1
  • 3

1 Answers1

0

try this?

select users.uid,acctype,uname from users where acctype='Teacher'&& users.uid not in     (select tid from teacher_subscription where uid=1)
Meow
  • 138
  • 1
  • 7