quote:
Originally posted by leachy08
You should just store 1 vote as one record in mysql. This will slow things down but shouldnt be that bad.
It will be that bad. Imagine, a few months down the line, several thousand votes have been cast. The query will take far longer to run than collecting all votes into a single record per script.
quote:
Originally posted by leachy08
And as for the download count you could use SELECT DISTINCT statement and count the recordset.
SELECT DISTINCT should only be used where necessary, as again it can slow queries down considerably. Again, with several thousand downloads, maybe even tens or hundreds of thousands, the size of the recordset makes SELECT DISTINCT impractical.