Connection between users and their datas

Discussion in 'PHP' started by Kuna, Jul 28, 2012.

  1. #1
    Where I can find more info about how to tie users just to their own data within mysql
     
    Solved! View solution.
    Kuna, Jul 28, 2012 IP
  2. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #2
    are you asking how mysql join statement works?
     
    atxsurf, Jul 28, 2012 IP
  3. Kuna

    Kuna Well-Known Member

    Messages:
    426
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    well if it is that what I want, then yes
     
    Kuna, Jul 28, 2012 IP
  4. #4
    well normally you have a table with user data (1 record per user) and some other table with many records per user (fro example table of forum posts).
    Than when you want to select all posts for given user you do someting like:
    select * from tbl_posts join tbl_users on tbl_users.id=tbl_posts.userid where tbl_users.name='Joe Doe'
     
    atxsurf, Jul 28, 2012 IP
    Kuna likes this.