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

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -

mysql - How to insert just year and month into date field? -