By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.

mysql query returns null value

P: 107
can anybody tell me why the following query returns null value.
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM yjdf4_tbltenders AS a
  3. LEFT JOIN yjdf4_tblclass AS b ON a.cls = b.clid
  4. LEFT JOIN yjdf4_tblcategory AS c ON a.wcategory = c.catid
  5. LEFT JOIN (yjdf4_tblclient AS d JOIN yjdf4_tblclscategory  AS e ON d.clcatid = e.clsid
  6. ) ON a.clientagency = d.cid
  7. LEFT JOIN yjdf4_tblpaper AS f ON a.paper =
  8. LIMIT 0 , 30
there are 3 columns in tblclass, these 3 columns returns null value. I have corresponding records in this table yet it returns null. I wonder why? All other tables returns values normally.

Please help me on this issue as its an emergency.
Jul 4 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,366
To even begin to offer help, we need to know the table structure and get some sample data.
Jul 4 '12 #2

P: 107
sorry guys troubling you all. infact the problem was within the underlying data in the db. i had deleted the data with the used id from the master table thats why it was returning null. With it now i am trying to find out how i can enforce integrity constraint so that i will not be able to delete records from the master tables if it is referenced in other tables.
Jul 6 '12 #3

Expert Mod 10K+
P: 12,366
That's a different question. You'll have to create a new thread for that. Forum policy is one question per thread.
Jul 6 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.