View Single Post
Old 09-14-2012, 10:13 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,172
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
I give up. If all you want are *ALL* the user_ids, once each, why are you involving the programs table, at all?

And why are you mucking with WHERE title_id = '$trimmed' and prog_id = '$prog_id' ") at all?

To get what you *SAY* you want, you simply need to do
Code:
    SELECT DISTINCT user_id FROM title_views
But you must have *some* reason for doing what you are doing, though I don't think we can figure that out from what you have posted so far.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote