If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > relationship/join tables is blank when executed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-07, 15:06
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 132
Red face 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;
Reply With Quote
  #2 (permalink)  
Old 10-26-07, 15:22
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
let's start with the query

could we see that please?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-26-07, 15:49
homer.favenir homer.favenir is offline
Registered User
 
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;
Reply With Quote
  #4 (permalink)  
Old 10-26-07, 16:25
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
looks perfect

could you please do a SHOW CREATE TABLE for each of them
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 10-26-07, 16:45
homer.favenir homer.favenir is offline
Registered User
 
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;
Reply With Quote
  #6 (permalink)  
Old 10-26-07, 17:20
homer.favenir homer.favenir is offline
Registered User
 
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
File Type: zip lvprod3.zip (8.9 KB, 41 views)
__________________
Take Nothing But Pictures;
Leave Nothing But Footprints;
Kill Nothing But Time;
Reply With Quote
  #7 (permalink)  
Old 10-28-07, 14:15
Coach4u Coach4u is offline
Registered User
 
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
Reply With Quote
  #8 (permalink)  
Old 10-30-07, 10:15
homer.favenir homer.favenir is offline
Registered User
 
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;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On