Quantcast
Viewing latest article 13
Browse Latest Browse All 47

Query all of a sudden stopped working - Simple left join but cannot see what is wrong

I had a query that was a simple left join between two tables with IS NULL included in the where clause because I needed all of the rows of the left table shown, even if it gave null values in the right table.

This worked as I had it working within my php code and my site was displaying what it needed. I haven't looked at this in over a week and went back today to see that it is now all of a sudden not working even though I haven't touched it.

I have created a db fiddle here with my exact code and tables - https://dbfiddle.uk/?rdbms=mariadb_10.4&fiddle=2effc82390641ce513806252700fd25c

I want to show - all rows in the left table (level_quiz) and all rows in the right table (student_points) where student_no = 40204123 OR there are NULL rows

Could anyone please have a look at this to see why it is not showing the extra row of the left table? (where there would be NULL values for the right table)

This would be much appreciated.


Viewing latest article 13
Browse Latest Browse All 47

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>