PHP question
| From: | reclmaples | Date: | Sun, 18 Sep 2005 04:36:11 +0000 |
| Subject: | PHP question | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-40292@lists.php.net to get a copy of this message | ||
I'm not sure if this is the correct distro, if not please let me know which
one I should send this to.
I am having an issue that I can't figure out. I have a table that has a
HOME and AWAY fields in it. I want to make those two fields (the result
will be one record in HOME and one record in AWAY per ID).
my sql looks like this:
select ID,HOME,AWAY where WEEK = '$WEEK' and USERNAME = '$username'
This loops to get all weeks and usernames in the table. Can anyone help me
with the php code. My problem is, if I have them looping through the users
in the table, how do I keep a variable for each record that is returned.
i.e
I have PIT in the HOME field and GIA in the AWAY field for WEEK = 1 with
username a blah (this would have an ID of 1)
I want PIT and GIA in the same dropdown, but also for username blah and
WEEK =1 (ID = 2) I have ATL in the HOME and PHI in the AWAY (the while loop
does this for me) How do I keep the variable for the ID =1 equal to what I
pick from that dropdown and how do I keep the value from the second drop
down. Can you help? I'm not sure if this is explained well enough, let me
know if you need more details.
Thanks
-Rich