I track whenever a person marks a testimonial as a favorite in the favorites table. Today I decided to show a report of which testimonials have been marked as a favorite the most. This query works fine:

select tID, count(*) as number from favorites group by tID order by number desc;

So now I want to display the results on the website for my readers to see. In this case I need the actual title of each of these testimonials:

PHP Code:
select t.titlef.tIDcount (*) as number
from testimonies t inner join favorites f
on t
.tID f.tID
where number 
group by f
order by number desc

Can someone help me see why I'm getting a 1064 mySQL error?