krappleby025
Programmer
hi all
i have two databases
au_primary_hits
users
now
i need to select the top 10 users, from the au_primary_hits table where the 'extra3' field in the users table is equal to a set code. IE 'topguns'
currently i have this
select * from ua_primary_hits where Month = '$chosenmonth' and Year = '$chosenyear' order by Month_Unique Desc LIMIT 10
which only selects the top 10 users from the au primary hits table.. Now i need to edit that.
now i need to merge that query to the one below
select * from users where extra3 = 'topguns'
so what i end up with is something like
select * from ua_primary_hits where ('users' field extra3 = 'topguns') and Month = '$chosenmonth' and Year = '$chosenyear' order by Month_Unique Desc LIMIT 10
any help would be appreciated, As i am only a beginner at this
Thank you for your help
keith
i have two databases
au_primary_hits
users
now
i need to select the top 10 users, from the au_primary_hits table where the 'extra3' field in the users table is equal to a set code. IE 'topguns'
currently i have this
select * from ua_primary_hits where Month = '$chosenmonth' and Year = '$chosenyear' order by Month_Unique Desc LIMIT 10
which only selects the top 10 users from the au primary hits table.. Now i need to edit that.
now i need to merge that query to the one below
select * from users where extra3 = 'topguns'
so what i end up with is something like
select * from ua_primary_hits where ('users' field extra3 = 'topguns') and Month = '$chosenmonth' and Year = '$chosenyear' order by Month_Unique Desc LIMIT 10
any help would be appreciated, As i am only a beginner at this
Thank you for your help
keith