Is this supposed to count the appearances of each link_id on the table?
SELECT link_id, count(*) FROM table group by link_id
I think it should, but if I just execute
SELECT * FROM table
I get different results. For example, for link 7 I get a count of 40 in the first query, but using ‘select *’ i see that there are only 4 rows of link 7… What’s going on?
Yes it is supposed to do that,
Surely it would be easier to do a
This would give you a single row containing the amount of link_id’s
Alternatively
Returns multiple rows containing the count of each
With regard to the original question you mention there are multiple rows per id, are you doing a join any where?
Are you sure phpMyAdmin or similar isn’t limiting the amount of rows you are seeing?