Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132

    Red face Unanswered: relationship/join tables is blank when executed

    i have a db, with 6 tables, when i link them or join them the output is blank.

    i made my db in xampp.each table as primary key.

    but when i executed the output it was blank.

    what seems to be the problem? is it my table or the primary key? or link?

    please advise..

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    let's start with the query

    could we see that please?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132
    Quote Originally Posted by r937
    let's start with the query

    could we see that please?
    SELECT
    production.Directory,
    production.Filename,
    filename.`Total Lists`
    FROM
    production
    INNER JOIN filename ON (production.prodid = filename.prodid)

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    looks perfect

    could you please do a SHOW CREATE TABLE for each of them
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132
    Quote Originally Posted by r937
    looks perfect

    could you please do a SHOW CREATE TABLE for each of them
    i have my DB in xampp, and i run it in phpmaker and i make report in crystal report.

    $sql = 'SELECT * FROM `production` LIMIT 0, 30 ';

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  6. #6
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132
    this is my db
    pls see attached file.

    i dont understand what seems to be wrong...i keep on trying to analyze this but i dont know the reason.

    BTW i like your academy.

    thanks
    Attached Files Attached Files
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

  7. #7
    Join Date
    Oct 2007
    Posts
    1
    try changing the it to this
    INNER JOIN filename ON (production.prodid < filename.prodid)
    or
    INNER JOIN filename ON (production.prodid > filename.prodid)
    if it works, it not finding the same prodid

  8. #8
    Join Date
    Oct 2007
    Location
    Manila, Philippines
    Posts
    132

    Question

    nope, it didnt work, it is just keep on repeating...
    i am using xampp and phpmaker for making php and sql.

    my primary key is not index.
    do i need to make it index?

    thanks
    Take Nothing But Pictures;
    Leave Nothing But Footprints;
    Kill Nothing But Time;

Posting Permissions

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