Previous Thread
Next Thread
Print Thread
Rate Thread
#277356 07/28/2004 2:38 PM
Joined: Apr 2004
Posts: 12
Ahz
Offline
Newbie
Newbie
Offline
Joined: Apr 2004
Posts: 12
I'd like to find out the SQL commands to get the following information:

a) Login name
b) User name (as shown on forums)
c) Registered on
d) Total Posts
e) Last On
f) Real email

on the specific groups.

Like i have a reg members group, admin group, guest group. etc.

Could I get all this info (a-f) on 1 command for each group? If so, what would the syntax be. Also is there any online reference for SQL query syntax that I could look up so i don't have to bother you poor folks?

thanks!

Sponsored Links
filxxx #277357 07/28/2004 2:50 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Info on MySQL queries can be found at www.mysql.com

First you need to know the number of the group you want to access the info for.

You can find the # of each group with this query:

SELECT * FROM w3t_Groups


Then, let's say you want to grab that info for group #5.

This query should do it:

SELECT U_LoginName,U_Username,U_Registered,U_Totalposts,U_LastOn, U_Email
FROM w3t_Users
WHERE U_Groups LIKE '%-5-%'

Daine #277358 07/28/2004 2:55 PM
Joined: Apr 2004
Posts: 12
Ahz
Offline
Newbie
Newbie
Offline
Joined: Apr 2004
Posts: 12
you rock. thanks.

filxxx #277359 07/28/2004 5:17 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Plus you can also add this to the end of the query...

ORDER BY U_Username

...to list the names alphabetically.

To reverse the default sorting order (ASCending), add DESC to that line as follows...

ORDER BY U_Username DESC

Reversing is more ideally suited to numeric values however, like total posts :-)

smoknz28 #277360 07/29/2004 11:54 AM
Joined: Apr 2004
Posts: 12
Ahz
Offline
Newbie
Newbie
Offline
Joined: Apr 2004
Posts: 12
i notice that u_laston and u_registered show up as long number strings ie. (last on)1091097145 and (registered)983415311... easy way to convert these to actual readable dates?

Sponsored Links
filxxx #277361 07/29/2004 2:23 PM
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Well, I can tell you that they are unix timestamps, so if you find something to convert those, then you should be all set.

BrokenToy #277362 07/29/2004 2:49 PM
Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803

Duck #277363 07/29/2004 3:49 PM
Joined: Apr 2004
Posts: 12
Ahz
Offline
Newbie
Newbie
Offline
Joined: Apr 2004
Posts: 12
awesome, thanks!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)