Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP MYSQL Table help

Dave
Guest
 
Posts: n/a
#1: Mar 27 '08
Ok so i have a database with a table users. The users each have a
unique id. Now i want to create another table called profile where the
users can edit their profile and it will be stored in the profile
table. But i need to somehow connect the tables together so when the
user saves itll save the information in the table profile under their
id that they have in the users table.

Help!

The Natural Philosopher
Guest
 
Posts: n/a
#2: Mar 27 '08

re: PHP MYSQL Table help


Dave wrote:
Quote:
Ok so i have a database with a table users. The users each have a
unique id. Now i want to create another table called profile where the
users can edit their profile and it will be stored in the profile
table. But i need to somehow connect the tables together so when the
user saves itll save the information in the table profile under their
id that they have in the users table.
>
Help!
Select *from profile, user where profile.user=$userid

update profile set () where profile,.user=$userid.
sheldonlg
Guest
 
Posts: n/a
#3: Mar 27 '08

re: PHP MYSQL Table help


Dave wrote:
Quote:
Ok so i have a database with a table users. The users each have a
unique id. Now i want to create another table called profile where the
users can edit their profile and it will be stored in the profile
table. But i need to somehow connect the tables together so when the
user saves itll save the information in the table profile under their
id that they have in the users table.
>
Help!
Another suggestion is to get a copy of MS Access. It has a good
graphical query builder. After you build the query, look at the SQL
statement. You can learn a lot that way in the beginning stages of
learning SQL.
sheldonlg
Guest
 
Posts: n/a
#4: Mar 27 '08

re: PHP MYSQL Table help


The Natural Philosopher wrote:
Quote:
Dave wrote:
Quote:
>Ok so i have a database with a table users. The users each have a
>unique id. Now i want to create another table called profile where the
>users can edit their profile and it will be stored in the profile
>table. But i need to somehow connect the tables together so when the
>user saves itll save the information in the table profile under their
>id that they have in the users table.
>>
>Help!
>
Select *from profile, user where profile.user=$userid
>
update profile set () where profile,.user=$userid.
No comma before the .user (we all make typos)
Dave
Guest
 
Posts: n/a
#5: Mar 27 '08

re: PHP MYSQL Table help


Thanks for the help!
Closed Thread