![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#91 |
Navy Seal
![]() |
![]() learn a thing or two
__________________
sent from my fingertips using a cheap keyboard |
![]() |
![]() |
![]() |
#92 |
Navy Seal
![]() |
![]() from the master. ![]()
__________________
sent from my fingertips using a cheap keyboard |
![]() |
![]() |
![]() |
#93 |
Grey Wolf
![]() Join Date: Feb 2009
Location: Central Indiana
Posts: 850
Downloads: 130
Uploads: 0
|
![]()
But I wanna use the squidopods...
__________________
Sunken Mustangs Proud Ford Mustang owner "Damn the torpedoes! Full speed ahead!" - Admiral David Farragut Run silent - run deep - keep the baffles clear - targets front and center. Private pilot and history buff |
![]() |
![]() |
![]() |
#94 | ||
Born to Run Silent
|
![]() Quote:
I want to minimize deleting actual people, so if a guy joined Dec 20 and his last activity was Dec 23, then he stays. I don't mind a guy being inactive for 6 months, as long as he is not a spammer. Does that make sense? Quote:
![]()
__________________
SUBSIM - 26 Years on the Web |
||
![]() |
![]() |
![]() |
#95 | |
Ocean Warrior
![]() |
![]() Quote:
![]() EDIT: Found this one while randomly looking for spammers: http://www.subsim.com/radioroom/member.php?u=276634 He logged in 3 days after he registered , however most found had their last activity on the date of registration. So the command to get all the infos about this account would look like this, this is the explicit statement, you can make it shorter, but this is better for the comprehension SELECT *(all infos, or whatever you need) FROM User AS U1 INNER JOIN Sigparsed AS S1 (just abbreviations to type less) ON U1.UserID = S1.UserId (UserId, or something simular would be your unique key that you can find in both tables) WHERE U1.Joindate >1291165261 AND (U1.Lastactivity - U1.joindate ) < 86400 AND U1.Totalposts < 2 AND S1.Signatureparsed NOT LIKE ' ' AND S1.signatureparsed IS NOT NULL ODER BY U1.Username ; Here is some material to learn SQL: A lecture by David Malan, who teaches at a little, unknown school on the East Coast. I think he is very articulate and intelligible: http://cs75.tv/2010/fall/#l=lectures...res/4/lecture4 At the lower left corner you'll find also the second part (lecture5) If you are more of a beginner, there is also a SQL lecture in the introduction to Computer Science class found here: http://cs50.tv/2010/fall/ If a lecture is broken you may want to play with the course dates in the upper drop-down menu to access courses from previous years. Last edited by Penguin; 05-24-11 at 09:23 AM. Reason: added spammer link |
|
![]() |
![]() |
![]() |
#96 |
Born to Run Silent
|
![]()
Thanks so much for the help. I am going to have a look at those course, I find SQL very interesting, I just never got on track with a tutorial that I could follow.
Question: in your query, you stated SELECT *(all infos, or whatever you need) The info I would want to select would be userID, signature, homepage, right? FROM User AS U1 INNER JOIN Sigparsed AS S1 (just abbreviations to type less) Abbreviations for what? Or did you simply give the join names really short names, like U1 ? That makes sense. AND U1.Totalposts < 2 That means any member with 1 post will not be selected, right? I can change that to < 1 and select all the 0 post users, right? Listen, I really appreciate the help. Neal
__________________
SUBSIM - 26 Years on the Web |
![]() |
![]() |
![]() |
#97 | |||
Ocean Warrior
![]() |
![]() Quote:
With the star it would show you all infos available (all columns) from both tables. If you want to use this statement to find the homepages it would just be something like this: SELECT U1.userpage - this would be usefull for a list of the userpages. To select more, just put a comma between, select U1.userpage, S1.signature, U1.shoesize, etc Quote:
![]() Quote:
![]() If you want to select the users with no posts, you use either "= 0", "<1", or "IS NULL". It depends on how the totalposts column looks if a new user is created. If the db puts a 0 (numeric zero) into that column in the moment a new user registers, you can use one of the first two statements. If the column is empty untill the first postcount is written into it, you have to use the IS NULL statement. |
|||
![]() |
![]() |
![]() |
#98 |
Ocean Warrior
![]() Join Date: Mar 2007
Location: Houston, TX
Posts: 2,731
Downloads: 393
Uploads: 12
|
![]()
Subsim:
Come for the spam hunts, stay for the SQL tutorials.
__________________
"Never ask a World War II history buff for a 'final solution' to your problem!" |
![]() |
![]() |
![]() |
#99 |
Born to Run Silent
|
![]()
Hahaha
![]()
__________________
SUBSIM - 26 Years on the Web |
![]() |
![]() |
![]() |
#100 |
Captain
![]() Join Date: May 2005
Location: Kassel, Germany
Posts: 542
Downloads: 345
Uploads: 0
|
![]()
Hi,
I'm coming from the SPAM-Hunt thread to this one. perhaps a little bit easier to handle: AND (DATEDIFF(U1.Lastactivity, U1.joindat) < "amount of days you want") BTW, the SQL looks very good for hunting spammers ![]()
__________________
My SH5-Mods: - Pacos German Folklore SubEmblems Mod - Pacos Environment Sound Mod - Lite Campaign German Edition |
![]() |
![]() |
![]() |
#101 |
Ocean Warrior
![]() |
![]()
Thanks for your input Paco, that's the reason why I put up the code here: always better if some more pair of eyes take look over it - no offence if you are a pirate
![]() ![]() I am not sure though if Datediff works if the dates are stored as a timestamp and not in date format, without having to convert it - otherwise Datediff is certainly more elegant! |
![]() |
![]() |
![]() |
#102 |
Born to Run Silent
|
![]()
Chinese Prisoners Allegedly Forced to Play 'World of Warcraft'
![]() Don't get any ideas! Yeah, we got the query working, weeded out almost 1000 spam accounts, probably another 3000 to go.
__________________
SUBSIM - 26 Years on the Web |
![]() |
![]() |
![]() |
#103 |
Cold War Boomer
![]() Join Date: Jan 2002
Location: Walla Walla
Posts: 2,837
Downloads: 5
Uploads: 0
|
![]()
You SQL guys are all a like ... for all we know you could be the same men in black that show up after UFO sightings
![]()
__________________
![]() |
![]() |
![]() |
![]() |
#104 |
Weps
![]() Join Date: Jan 2009
Location: Virginia
Posts: 362
Downloads: 8
Uploads: 0
|
![]()
All this talk about squirrels makes me hungry.
![]() |
![]() |
![]() |
![]() |
#105 |
Rear Admiral
![]() |
![]() ![]() |
![]() |
![]() |
![]() |
|
|