![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
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 |
![]() |
![]() |
![]() |
#2 | |||
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. |
|||
![]() |
![]() |
![]() |
#3 |
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!" |
![]() |
![]() |
![]() |
#4 |
Born to Run Silent
|
![]()
Hahaha
![]()
__________________
SUBSIM - 26 Years on the Web |
![]() |
![]() |
![]() |
|
|