[thelist] Selecting most active n blogs [php/mysql]
Nick Wilson
nick at explodingnet.com
Fri Apr 12 13:51:01 CDT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* and then Martin Kuplens-Ewart declared....
> [summarised as selecting 5 most commented-on blogs from a table]
>
> Select all blogs
> For each, grab number of comments [from separate table]
> Then evaluate number of comments, rejigging position in results, until 5
> with most comments have been found.
>
> Is there a faster way of doing this?
select all blogs and coments
order by comments limit to 5
I'm no MySQL guru but I reckon that'd do it :-)
- --
Nick Wilson // www.explodingnet.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iD8DBQE8ty0WHpvrrTa6L5oRAuElAJ9BTwyHngL8JgRWK385qGC2aI3VawCeMFGT
tdLoNd8A89vGMBH8W0itoqo=
=BON3
-----END PGP SIGNATURE-----
More information about the thelist
mailing list