energie_obsah.contents now permitted NULL to show just the title image
[www.energie.vellum.cz.git] / obsah.php
index eb262e1..f1737c9 100644 (file)
--- a/obsah.php
+++ b/obsah.php
@@ -28,9 +28,9 @@
 
        print("<h1>$title_tail</h1>\n");
 
-       $result=db_query("select year,month,month_last,contents from $tb_obsah"
-                       .($year  ? " where year=$year"   : "")
-                       .($month ?   " and month=$month" : "")
+       $result=db_query("select year,month,month_last,contents from $tb_obsah where contents is not null"
+                       .($year  ? " and year=$year"   : "")
+                       .($month ? " and month=$month" : "")
                        ." order by year,month"
                        );
        if (!mysql_num_rows($result))