Connecting Tech Pros Worldwide Help | Site Map

PHP MYSQL Table help

  #1  
Old March 27th, 2008, 08:25 PM
Dave
Guest
 
Posts: n/a
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!
  #2  
Old March 27th, 2008, 09:15 PM
The Natural Philosopher
Guest
 
Posts: n/a

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.
  #3  
Old March 27th, 2008, 09:15 PM
sheldonlg
Guest
 
Posts: n/a

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.
  #4  
Old March 27th, 2008, 09:25 PM
sheldonlg
Guest
 
Posts: n/a

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)
  #5  
Old March 27th, 2008, 09:55 PM
Dave
Guest
 
Posts: n/a

re: PHP MYSQL Table help


Thanks for the help!
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
using php to move rows from text file into mysql table mantrid answers 12 June 21st, 2007 11:45 PM
Extending variable scope? (Related post at alt.php.mysql) strawberry answers 5 November 8th, 2006 01:15 AM
Mysql table rows delete HELP Dejan answers 9 April 10th, 2006 12:25 PM
Problems retrieving DATESTAMP/TIMESTAMP via PHP+MySQL Bert Sierra answers 3 July 17th, 2005 09:35 AM