I'm trying to select the number of names in the database equal to "dog", and save the number of searches found into a variable php? e.g number of dogs found = 4;. Where I can store this as a variable.
So far I got this:
SELECT id, COUNT(id) FROM `profiledb` GROUP BY id
Use it like this, assuming your name field
SELECT name, COUNT(id) as number_of_searches FROM profiledb WHERE name = 'dog'