Posted by tendiamonds on 2005-07-25 19:40:29 +0000
Top six posters in the shiz-ouse!
Usual suspects representing.
If G-Lib were here we'd have the attention of everyone over 400...
tgl, can we sort gang members by number of posts?
Posted by rladew on 2005-07-25 19:44:05 +0000
65 more posts for me until rap moves on to the year 2000.......
Its gonna take more time patience and effort to best mike f or tgl on this I'm afraid.
"TGL's Got the 10 1/2"!!!!!!!!
_______________________________
Yeah. Maybe there is some kinda OUTER JOIN, INNER JOIN mechanism. That can do it. Here's the bones:
+-----+
|users|
+-----+
|uid |
+-----+
+-----+
|node |
+-----+
|nid |
|uid |
+-----+
+-----+
|comments
+-----+
|cid |
|uid |
|nid |
+-----+
I want to count and then order by the number of posts for a user (uid) in the comments and node tables.
Posted by tendiamonds on 2005-07-26 19:17:46 +0000
I haven't done mySql since my Go2Net days... what's the query you use to get the number you display?
Go2Net! Ha! No wonder they went under. MySQL _STILL_ doesn't support transactions.
I do this:
"SELECT users.uid, users.name, users.mail, users.created, count(*) AS posts FROM users, comments WHERE users.uid = comments.uid AND users.uid > 0 GROUP BY users.uid, users.name, users.mail, users.created ORDER BY " . $sort
Then I add the result of:
"SELECT count(*) FROM node WHERE uid = " . $uid
For every line as I generate the output table.
Posted by tendiamonds on 2005-07-26 19:37:47 +0000
I hope frame is bored to death.
I assume then that this is in php... if so, you can get all your data up front from mySql, and then deal with the output arrays in a perl-like manner. You should be able to do a query that gets users and count from each table, then merge them yourself, then sort, then make the html... no?
Posted by tendiamonds on 2005-07-26 19:40:39 +0000
Go2Net may have sucked, but they did not go out of business, they were bought by InfoSpace. InfoSpace is still my favorite white pages online.
Yeah, I could do that. I'm not too familiar with PHP (yet). I was hoping that I could do it all with SQL. (Even though my company is currently having an ERP system installed that is written entirely in SQL. Yuck!)
Here we go.
Posted by tendiamonds on 2005-07-27 03:20:27 +0000
Looks hot... but now everyone's numbahz look inflated? Why can't I hold down my top 5 spot!?
Posted by rladew on 2005-07-27 03:29:53 +0000
last one. no more google images for me.
[img]http://www.friedmanarchives.com/China/Web/Chapter12/Sleeping_on_desk_4x6_72_dpi.jpg[/img]
_______________________________
Posted by pamsterdam on 2005-07-27 06:02:53 +0000
Wait, G - he didn't beat you - you beat him!!!
Wooooooooooooo! Girl power!
[img]http://imagecache2.allposters.com/images/MMPH/234709.jpg[/img]
(in case you don't recognise us, that's Dina, me, Miriam, G, and Jenny at a Malbert costume party a few years ago... good times.)
It wasn't counting blog or poll nodes. Now it is. One problem: I'm using the thing I want to sort with as the key into the associative array. That means a person might not get listed if some else after them in the user query has the same post total.
I can sort by value, but, not sure if that means the first element in the value array or some weird magical accumulation of the value array.
I could probably look it up.
Posted by tendiamonds on 2005-07-27 13:59:54 +0000
Well done, tgl. Using the count as the key is so ugly it's pretty again.
Posted by Miriam on 2005-07-27 14:34:24 +0000
I've always wanted to be that tan!
Posted by dawnbixtler on 2005-07-27 15:20:52 +0000
BABY SPICE?!?!?!?!?!?
.
You are SO not my friend anymore, Pamsterdam.
.
Ach, who am I kidding. Baby spice+SoccerMom = G Lib.
.
(Just kidding, Pam!)
________________
--Feminazi
Posted by tendiamonds on 2005-07-29 16:49:27 +0000
Awesome, tgl, I love it.
Posted by rladew on 2005-07-29 16:56:53 +0000
Party like its...
_______________________________
Posted by rladew on 2005-07-29 16:57:10 +0000
1999!
_______________________________
Posted by rladew on 2005-07-29 16:57:37 +0000
rladew moves on to the year 2000!!!!!
_______________________________
Posted by tendiamonds on 2005-07-29 17:32:28 +0000
Oh, I get it... there's that bug you have when you don't show up on the list if you have the same number of posts as someone else... (well, one of you doesn't) So I disappeared as I was dethroning G-Lib from the Top5... woo hoo!
Posted by pamsterdam on 2005-08-08 08:21:25 +0000
Baby Spice is the cutest.
Is this the real reason you didn't come to the Model?