Comments on: How to Break a MySQL Left Join http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/ Fri, 01 May 2015 10:33:31 +0000 http://wordpress.org/?v=2.8.4 hourly 1 By: Ring Zero http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15372 Ring Zero Tue, 23 Aug 2011 22:47:30 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15372 <p>If the log_deleted exist and are all <> 0 for a given task_id, you are likely to miss the tasks rows for that particular task_id.<br>As BrianHartin mentioned, the condition log_deleted=0 has to be put in the LEFT JOIN after a AND. Otherwise the WHERE will cut the rows in that particular case, after the LEFT JOIN was computed by MySQL.</p> If the log_deleted exist and are all <> 0 for a given task_id, you are likely to miss the tasks rows for that particular task_id.
As BrianHartin mentioned, the condition log_deleted=0 has to be put in the LEFT JOIN after a AND. Otherwise the WHERE will cut the rows in that particular case, after the LEFT JOIN was computed by MySQL.

]]>
By: Ilan http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15373 Ilan Wed, 06 Jul 2011 15:08:10 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15373 <p>I have wrote a post about LEFT JOIN: in what conditions should I put the conditions in the ON clause.<br>See <br><a href="http://www.mysqldiary.com/mysql-left-join/" rel="nofollow">http://www.mysqldiary.com/mysq...</a></p> I have wrote a post about LEFT JOIN: in what conditions should I put the conditions in the ON clause.
See
http://www.mysqldiary.com/mysq...

]]>
By: jahan http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15374 jahan Fri, 10 Jun 2011 02:35:22 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15374 <p>This is indeed a very nice example on how to build a conditional left join. I've been searching for a solution a very long time and accidentally stumbled upon this one.<br>truly helpful!<br>cheers,<br>jahan</p> This is indeed a very nice example on how to build a conditional left join. I've been searching for a solution a very long time and accidentally stumbled upon this one.
truly helpful!
cheers,
jahan

]]>
By: MySQLuser http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15375 MySQLuser Wed, 10 Feb 2010 12:24:05 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15375 <p>I have found interesting post about Conditional Joins at<br><a href="http://www.mysqldiary.com/conditional-joins-in-mysql/" rel="nofollow">http://www.mysqldiary.com/cond...</a><br>Nice example with good explain. Helped me a lot.</p> I have found interesting post about Conditional Joins at
http://www.mysqldiary.com/cond...
Nice example with good explain. Helped me a lot.

]]>
By: MySQLuser http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15209 MySQLuser Wed, 10 Feb 2010 06:24:05 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15209 I have found interesting post about Conditional Joins at<br><a href="http://www.mysqldiary.com/conditional-joins-in-mysql/" rel="nofollow">http://www.mysqldiary.com/conditional-joins-in-...</a><br>Nice example with good explain. Helped me a lot. I have found interesting post about Conditional Joins at
http://www.mysqldiary.com/conditional-joins-in-...
Nice example with good explain. Helped me a lot.

]]>
By: Aaron http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15200 Aaron Sat, 17 Oct 2009 02:19:03 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15200 Great article. It pointed me in the right direction. Thanks for doing this, these kind of blogs save a lot of headache! Great article. It pointed me in the right direction. Thanks for doing this, these kind of blogs save a lot of headache!

]]>
By: Greg Allard http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15112 Greg Allard Thu, 08 Jan 2009 20:43:32 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15112 I'm glad that this has been able to help other people out I'm glad that this has been able to help other people out

]]>
By: Shane http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-15111 Shane Thu, 08 Jan 2009 20:33:51 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-15111 You are awesome, stumbled upon you today after spending hours and hours stumbling about frustrated. You are awesome, stumbled upon you today after spending hours and hours stumbling about frustrated.

]]>
By: Prashant Deepak Vedpathak http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-13330 Prashant Deepak Vedpathak Tue, 05 Aug 2008 08:08:23 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-13330 Thanks Greg and Sean.<br><br>It helped me to reduce me number of sec to execute my query by using the left join and coalesce concept. Thanks Greg and Sean.

It helped me to reduce me number of sec to execute my query by using the left join and coalesce concept.

]]>
By: Prashant Deepak Vedpathak http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/comment-page-1/#comment-11850 Prashant Deepak Vedpathak Tue, 05 Aug 2008 07:08:23 +0000 http://codespatter.com/2008/02/19/how-to-break-a-mysql-left-join/#comment-11850 Thanks Greg and Sean. It helped me to reduce me number of sec to execute my query by using the left join and coalesce concept. Thanks Greg and Sean.

It helped me to reduce me number of sec to execute my query by using the left join and coalesce concept.

]]>