mysql query result -


i have built query kind of self explanatory:

select events.*,(select count(*) events_participants events_participants.eventid=events.eventid)as participants,linkviews.totviews events inner join linkviews on events.event_id=linkviews.eventid 

in events table have 6 events query return 3 of them (id:1,2,4).

enter image description here

where query wrong?

hope infos enough

thanks luca

try left outer join instead of inner join. there no matching eventid in linkviews table/view.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -