Using MySQL Join -


i'm trying join 2 mysql tables staffid 1 , username tied staffid in table have username displayed

select ost_ticket.staff_id, count(*) numbers  ost_ticket join ost_staff re on re.username = us.userid group ost_ticket.staff_id; 

from i've been reading joins should work?

edit: i've ran , unknown column 'ost_ticket.staff_id' in field list

select us.staff_id, re.username, count(*) numbers  ost_ticket join ost_staff re on re.userid= us.staff_id group us.staff_id; 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -