snowboardr
Programmer
I have this SQL :
I need to show only records that return a starcount of > 0 but when try to add star count to either the count or the where section of the SQL i get a column could not be found... how can i do this?
Regards,
Jason
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]
Code:
Select DISTINCT th.tid, th.tname, th.tmain, th.tcolor, (SELECT COUNT(star.stid) FROM userstars as star WHERE star.stid=th.tid AND sonuid=1) as starcount FROM thread th WHERE th.tmain=1
I need to show only records that return a starcount of > 0 but when try to add star count to either the count or the where section of the SQL i get a column could not be found... how can i do this?
Regards,
Jason
Jason
[red]Army[/red] : [white]Combat Engineer[/white] : [blue]21B[/blue]