Page 1 of 1

Linking tables

Posted: Wed May 24, 2006 5:36 pm
by hijacker
Yup, Im a newbie to these forums, but not to php. I have know and learned php for about a year now, but im not an expert... Im only 14 actually. But whatever, I remember about reading something about using a simalar object (dont know there real name) to connect 2+ tables in the same database. Can someone help me out on this?

Posted: Wed May 24, 2006 5:43 pm
by Burrito
define 'connect two tables'.

do you mean you want to 'join' two tables in a sql query?

Posted: Wed May 24, 2006 5:49 pm
by hijacker
No, Like lets say i have a table that have Num and Username in a table an in another i have Username and Password. I remember readin somewhere i can use the Username in each of them to use data between the 2.

Posted: Wed May 24, 2006 5:52 pm
by Burrito
that sounds like you're talking about a 'join'.

there are a few different join types.

inner, left, =, etc.

take a look here for more info on sql joins: http://dev.mysql.com/doc/refman/5.0/en/join.html

Posted: Wed May 24, 2006 5:53 pm
by feyd