 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
05-14-2008, 01:12 AM
|
#1 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
while loops and the proper code
GAH! it drives me insane, i'm going to blow my fucking open with a fucking gun.
anyway, whats the proper code to stop while loops from giving me duplicates of fucking bullshit.
heres my problem, i have a custom forum, where the posts go by the fid for counting them, well, whenever I even try to add the fucking posts table, it duplicates my fucking forums, now I understand that its just grabbing the posts too so, whats the proper code for this? -_-
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 01:16 AM
|
#2 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
also, why do I have duplicate threads? no i ment on this forum, its like the problems find themselves back into my place. -_- fucked up. im really mad :D
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 01:24 AM
|
#3 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Disclaimer: If language offends you, walk away now.
First off, I have never seen a way that PHP can produce "fucking bullshit", I didn't even know bullshit could fuck. I also find it ironic that instead of ID you use Fid, hmmmm.
I am not fucking sure about your fucking question, I would have to see the fucking code before I could make a fucking decision.
|
|
|
|
05-14-2008, 02:04 AM
|
#4 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Village Idiot
Disclaimer: If language offends you, walk away now.
First off, I have never seen a way that PHP can produce "fucking bullshit", I didn't even know bullshit could fuck. I also find it ironic that instead of ID you use Fid, hmmmm.
I am not fucking sure about your fucking question, I would have to see the fucking code before I could make a fucking decision.
|
lol, i even missed a few words, cause language is soooo hard. xD anyway, fid is the forum id, and i have the post table have 'forumid' for it to direct the forum ids to fid but, it just repeats the same forum names over... yeah..
by the way, heres your fucking code, fucking fucking fuck :P
Code:
SELECT forums.fid,forums.name,forums.desc,posts.pid,posts.forumid
FROM forums,posts
Group By forums.fid
I classify it as noobish code, cause I'm not trying to make anything professional. :P
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 02:18 AM
|
#5 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
it makes me sad that iv'e been able to accomplish this type of stuff before, but now, i cant. LOL
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 02:21 AM
|
#6 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
by the way, i tried to do WHERE posts.forumid='forums.fid' and it gave me nothing, this is basically saying that the forumid is 1 and the fid is 1, so it would say 1='1', so this is stupid. -_-
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 02:44 AM
|
#7 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
wow i finally got it and it was easy.. i cant think D:
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-14-2008, 06:51 PM
|
#8 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 166
Thanks: 0
|
sql Code:
SELECT forums.fid,forums.name,forums.DESC,posts.pid,posts.forumid FROM forums,posts WHERE posts.forumid = forums.fid
When you put single quotes around it it was looking for where the column's value is that string and not where the two columns equal.
Also you should avoid using keywords for column names (change desc to something else).
__________________
Eric
|
|
|
|
|
The Following User Says Thank You to wGEric For This Useful Post:
|
|
05-14-2008, 07:30 PM
|
#9 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
This is just a test
Quote:
|
Originally Posted by ttt
Quote:
|
Originally Posted by ttt
test
|
test
|
ytest
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
05-16-2008, 08:10 AM
|
#10 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
|
@Orc.
Please try to be an mature adult and use proper language in this forum. There is no reason for dragging your profanity's in here. I can understand that your upset but you only show a lack of communication skills when using cursing instead of the proper words.
I come to these forums to read interesting discussions on the PHP subject not some peoples ongoing rants filled with cursing words. So option them out of your next post.
Other then that, good luck! :)
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
|
|
|
|
05-16-2008, 02:24 PM
|
#11 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by EyeDentify
@Orc.
Please try to be an mature adult and use proper language in this forum. There is no reason for dragging your profanity's in here. I can understand that your upset but you only show a lack of communication skills when using cursing instead of the proper words.
I come to these forums to read interesting discussions on the PHP subject not some peoples ongoing rants filled with cursing words. So option them out of your next post.
Other then that, good luck! :)
|
And yet, you didn't support the thread, didn't give me a good solution to my problem. :P
__________________
VillageIdiot can have my babbies ;d
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|