Ok, I have to ask a few questions before I try that because there is a lot of stuff there that is new to me.
When you do "...from barlist b" you are actually creating a variable, b, which is a barlist? That way you can do the "select b.barid" that should really give you the barid from the results from barlist b.
I've done some joins, but not like that. Could you explain "left join userdestinations t1 on b.barid = t1.first_bar and t1.date = '$this_date' " line. Particularly, the "left" part is completely new to me.
Finally, the "count(t1.first_bar) as 'first_bar_count'" line means that afterwards I can call row_query['first_bar_count'] to get the number of times the bar pops up as first_bar? Also, I couldn't find much information, other than error messages and troubleshooting, about the count function on mysql.net, so I really don't know what count(t1.first_bar) does, or what count* does or pretty much anything else involving count, and I also can't seem to find count on mysql.com.
As a side note, it looks to me like this will have 3 separate counts: one for when the bar is is either in the first, second, or third position. If it could make the code simpler, it doesn't matter to me which position it is in and for each person, the bar will only appear once in one fo the positions (a person is not allowed to have the same bar more than once). Since a person isn't allowed to have the same bar more than once, I could also add the 'first_bar_count' to the other two counts and get the same results, but I thought I would mention this in case it makes things easier.
Anyway, I didn't mean to sound ungrateful because this is a big help, but I'm still kinda far away from understanding it. Regardless, thanks for the great help, but if you could clarify, that would be great.