Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 16:06
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 95
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, 16:22
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
let's start with the query

could we see that please?
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #3 (permalink)  
Old 10-26-07, 16:49
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 95
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, 17:25
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,556
looks perfect

could you please do a SHOW CREATE TABLE for each of them
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
  #5 (permalink)  
Old 10-26-07, 17:45
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 95
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, 18:20
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 95
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, 31 views)
__________________
Take Nothing But Pictures;
Leave Nothing But Footprints;
Kill Nothing But Time;
Reply With Quote
  #7 (permalink)  
Old 10-28-07, 15: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, 11:15
homer.favenir homer.favenir is offline
Registered User
 
Join Date: Oct 2007
Location: Manila, Philippines
Posts: 95
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

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