My data not appear

Reply

Join Date: Aug 2009
Posts: 7
Reputation: aerliana is an unknown quantity at this point 
Solved Threads: 0
aerliana aerliana is offline Offline
Newbie Poster

My data not appear

 
0
  #1
Oct 22nd, 2009
  1. "SELECT tbl1.staff_ic, tbl1.staff_name, tbl2.dec_status,tbl4.location,
  2. tbl3.post,tbl3.grade
  3. FROM staff_detail tbl1
  4. INNER JOIN staff_declare tbl2
  5. ON tbl1.staff_ic = tbl2.staff_ic
  6. INNER JOIN staff_post tbl3
  7. ON tbl1.staff_post = tbl3.num
  8. INNER JOIN staff_department tbl4
  9. ON tbl1.staff_dep = tbl4.no
  10. ";
isn`t my coding is right?? why when i execute my command just certain data are appear and the rest not appear
Last edited by peter_budo; 33 Days Ago at 4:56 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 21
Reputation: spthorn is an unknown quantity at this point 
Solved Threads: 5
spthorn's Avatar
spthorn spthorn is offline Offline
Newbie Poster
 
0
  #2
Oct 22nd, 2009
The INNER JOIN will only display data found in both the joined tables. Perhaps your staff_declare, staff_post and staff_department are sparse?
All opinions 100% correct. Or your money back.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 190
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 25
mwasif mwasif is offline Offline
Junior Poster
 
0
  #3
33 Days Ago
Can you clarify the "certain data"? Read all about JOINs at MySQL Manual.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC