So I have three tables....
egg
hatch
er
let's use table egg as an example
in the table egg there are 2 columns, user and code
What code do I use to get all the code entries from one user?
database question
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: database question
$user = mysql_real_escape_string($user);robynprivette wrote:So I have three tables....
egg
hatch
er
let's use table egg as an example
in the table egg there are 2 columns, user and code
What code do I use to get all the code entries from one user?
SELECT `code` FROM `egg` WHERE `user`=$user;
Re: database question
Your question isn't very specific, but I would say you need to read some basic tutorials on relational database theory. I recommend the following:
http://www.surfermall.com/relational/lesson_1.htm
http://www.kirupa.com/developer/php/rel ... design.htm
http://www.geekgirls.com/databases_from_scratch_3.htm
http://www.tekstenuitleg.net/en/article ... stics.html
http://www.surfermall.com/relational/lesson_1.htm
http://www.kirupa.com/developer/php/rel ... design.htm
http://www.geekgirls.com/databases_from_scratch_3.htm
http://www.tekstenuitleg.net/en/article ... stics.html