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

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -