Hi,
This should be straightforward , but I can't seem to figure it out! I have two tables called members and clubs, and a session variable called thename which is the user's user name from the login procedure.
I want to retrieve data from the clubs table only, but based on the user name (which is in the member table). Doing this produces an error:
I know $thename carries the user name because I 'echoed' it as a test. So why do I get the 'not a valid mysql result resource' error mesage?
Trying other possibilities such as:
doesn't work either.
Failing this, when the user initially logs in, can I write a query which will insert the same information into both tables (say, the user name)?
I don't even know if I can have more than one query per page! And if so, can they be called the same thing?
This should be straightforward , but I can't seem to figure it out! I have two tables called members and clubs, and a session variable called thename which is the user's user name from the login procedure.
I want to retrieve data from the clubs table only, but based on the user name (which is in the member table). Doing this produces an error:
Code:
$showrow = "select member.loginname,member.clubname from member, * from clubs where member.loginname='$thename' ";
Trying other possibilities such as:
Code:
"select * from clubs where member.loginname ='$thename' ";
Failing this, when the user initially logs in, can I write a query which will insert the same information into both tables (say, the user name)?
I don't even know if I can have more than one query per page! And if so, can they be called the same thing?
Comment