atitthaker Posted June 15, 2007 Share Posted June 15, 2007 Hi @ll, I have two tables t1 and t2, now I am doing t1 LEFT JOIN t2. In the where clause I need to test some condition against table t1. So I am putting the condition like t1.fld_name = <some_val>. and this does not match with any row. If I am having count(t1.field1), it shall get count "0" for that row, but it is not generating result for that row. As the condition I am putting, is being generated dynamically and I can't append it to the JOIN. What is the solution for above stated problem?? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/55693-join-problem/ Share on other sites More sharing options...
Illusion Posted June 15, 2007 Share Posted June 15, 2007 Count will be displayed only when at least one result is returned. can you post the query you are using. Quote Link to comment https://forums.phpfreaks.com/topic/55693-join-problem/#findComment-275191 Share on other sites More sharing options...
bubblegum.anarchy Posted June 15, 2007 Share Posted June 15, 2007 So I am putting the condition like t1.fld_name = <some_val> and this does not match with any row. If I am having count(t1.field1), it shall get count "0" for that row, but it is not generating result for that row. Why are you expecting a result if you are getting a zero row count ? Quote Link to comment https://forums.phpfreaks.com/topic/55693-join-problem/#findComment-275235 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.