MAIN SITE NEW TOPIC USERLIST SMILIES BUGREPORT
 
USER: Guest - POSTS:0 -

 

SEARCH FUNCTION MAKE NOTE OF THAT!
GENERAL | FLASH | PROGRAMMING | PROJECTS | ANIME | GAMING | FILM | MUSIC | OTHER | PROMOTION | SUGGESTIONS | FIGHT CLUB | NEWS
| DELETED CRAP| THE PUB | DR ¥'S PSYCHIATRY | JONGLEURS | ALL

 
Randomly generated wisdom: The mouth bone's connected to the ...foot bone!

Grabbing data from 2 diff tables in ONE mysql query... by RiftMaster 2184 - Sylvester Stallone EDIT THIS POST (ip Logged) on 2005-12-06 21:24:38

Gutterpunk King RiftMaster
Moderator
Leet

Power:2184
Zenny:1360
Posts:49

How is it done? See I want to let the user view the profiles of people on the scoreboards. The thing is the name may or may not be the name of a registered user. I need to load my data from the scoreboard (inside a while() loop I might add) and while doing that I want to check and see if the name existed on the user table, and if so I create a link to the profile page with the _id of the user from the _users table.





ET Games

Reply to this


Comments:
Re: Grabbing data from 2 diff tables in ONE mysql query... by MCFR4GII 29935
True MCFR4G EDIT THIS POST 2004-04-02 15:07:23
( 3458 )

"Alcohol Disposal Unit"
MCFR4GII

Administrator


Power:29935
Zenny:1415
Posts:1067

For this kind of thing you might want to look up MYSQL subqueries, and play around with that tedious join function.

Here's a site with some info on subqueries

I haven't really read it so if it's crappy I can try and find you another source, but at least it is a start.



_
%A` ----------------*-
|MCFR4G====.50=====
|##|_'/
|##|
==='

"Thats why your gun says 'replica,' and mine says 'MCFR4G POINT FIVE OH.'"

Re: Grabbing data from 2 diff tables in ONE mysql query... by RiftMaster 2184
Sylvester Stallone EDIT THIS POST 2004-04-02 14:59:38
( 3459 )

Gutterpunk King RiftMaster
Moderator


Power:2184
Zenny:1360
Posts:49

cool man. thanks. this just might be what I was looking for!



ET Games

Re: Grabbing data from 2 diff tables in ONE mysql query... by wikkiwakka 9422
Goku EDIT THIS POST 2004-04-05 18:28:41
( 3460 )

Honourable
wikkiwakka

Administrator


Power:9422
Zenny:370
Posts:262

If I think I know what you're asking about, try the mysql join syntax, although I'm not possitive that this is what you're asking about.. http://www.mysql.com/doc/en/JOIN.html



Ever wonder why people hate themselves so much...

Re: Grabbing data from 2 diff tables in ONE mysql query... by Demosthenes 121
George Michael EDIT THIS POST 2005-05-18 19:02:58
( 3586 )

Demosthenes
Member
Neutral

Power:121
Zenny:110
Posts:2

Well mabey if you all would get a little smarter, you'd realise that your all pathetic losers... get a life. go outside, for gods sake you all are pasty, way too white, losers who should be shot for wasting what could have been good lives on your one true love... your computers!!!!! Oh and by the way... Kicking me off this site will only prove 2 things... 1. that you have no control over your real lives, so you just try and control someone elses on the comp. which shouldnt really matter becaause if you got off your computers every once in a while you would realise life is pretty good without your comp... and 2. It prooves that you have no friends in real life, so you must make fake friends on a message board, and youll kick everyone off who might possibly help these poor pathetic losers get a life... you want to BE their lives so you wont let them have a real life... Now please listen to my advice, get real lives, get real friends, and for once... TURN OFF YOUR COMPUTERS!!! Now if youll excuse my Ill be going outside now.

Re: Grabbing data from 2 diff tables in ONE mysql query... by MCFR4GII 29935
True MCFR4G EDIT THIS POST 2005-12-06 19:36:00
( 3587 )

"Alcohol Disposal Unit"
MCFR4GII

Administrator


Power:29935
Zenny:1415
Posts:1067

LOL FAG!
Post about it on your live journal you little shitstain-homo.
Why would I "kick you off the site?"
BANNED!



_
%A` ----------------*-
|MCFR4G====.50=====
|##|_'/
|##|
==='

"Thats why your gun says 'replica,' and mine says 'MCFR4G POINT FIVE OH.'"

Re: Grabbing data from 2 diff tables in ONE mysql query... by MCFR4GII 29935
True MCFR4G EDIT THIS POST 2005-12-06 21:24:38
( 3588 )

"Alcohol Disposal Unit"
MCFR4GII

Administrator


Power:29935
Zenny:1415
Posts:1067

Test



_
%A` ----------------*-
|MCFR4G====.50=====
|##|_'/
|##|
==='

"Thats why your gun says 'replica,' and mine says 'MCFR4G POINT FIVE OH.'"

[1]

 


LOGIN: PASS :

Hot Topic (20 Posts) New Topic (Posted today) Locked Topic (Cannot Reply)
Board Coded and Powered by MCFR4G using PHP and MySQL Database
Source code copyright of MCFR4G 2002-2010