943,936 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 567
  • MySQL RSS
Oct 22nd, 2009
0

My data not appear

Expand Post »
MySQL Syntax (Toggle Plain Text)
  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; Oct 25th, 2009 at 4:56 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aerliana is offline Offline
7 posts
since Aug 2009
Oct 22nd, 2009
0
Re: My data not appear
The INNER JOIN will only display data found in both the joined tables. Perhaps your staff_declare, staff_post and staff_department are sparse?
Reputation Points: 10
Solved Threads: 5
Newbie Poster
spthorn is offline Offline
21 posts
since Sep 2007
Oct 25th, 2009
0
Re: My data not appear
Can you clarify the "certain data"? Read all about JOINs at MySQL Manual.
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Query optimization
Next Thread in MySQL Forum Timeline: Special chars in Insert query...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC