PHP MYSQL Table help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    PHP MYSQL Table help

    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

    #2
    Re: PHP MYSQL Table help

    Dave wrote:
    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=$u serid

    update profile set () where profile,.user=$ userid.

    Comment

    • sheldonlg

      #3
      Re: PHP MYSQL Table help

      Dave wrote:
      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.

      Comment

      • sheldonlg

        #4
        Re: PHP MYSQL Table help

        The Natural Philosopher wrote:
        Dave wrote:
        >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=$u serid
        >
        update profile set () where profile,.user=$ userid.
        No comma before the .user (we all make typos)

        Comment

        • Dave

          #5
          Re: PHP MYSQL Table help

          Thanks for the help!

          Comment

          Working...