Results 1 to 2 of 2
  1. #1
    Join Date
    May 2013
    Posts
    1

    Unanswered: read foreign key SQL query

    BorderTable
    +-----------------------+
    | border |
    +-----------------------+
    | braet_image1 |
    | braet_image2 |
    | braet_iamge3 |
    +-----------------------+


    History Table
    +-----------------------+----------------------------------------------+
    | id | startX |startY| endX| endY | winOrLose | BorderTable_border |
    +-----------------------+------------------------------------------------+
    | 1 | 2 | 2 | 3 | 3 | Nej | braet_image1 |
    | 1 | 4 | 4 | 5 | 5 | Ja | braet_image2 |
    | 1 | 2 | 3 | 6 | 6 | Ja | braet_image3 |
    +-----------------------+------------------------------------------------+


    The quesation is:

    I want to select one of the borderTable, and get all history related to selected table. how can i do that. Can you please make a query. Im new in sql, i tried in few hours and now 6 hour gone, and still same place. Please help.

    Bedt regards

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    What have you tried so far?
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •