]> andersk Git - sql-web.git/blobdiff - lib/joe.lib.php
changed NATURAL JOINs to INNERs to avoid conflicting keys
[sql-web.git] / lib / joe.lib.php
index 04c4dc19106ad7f2cb637d36435be7f3c8a67961..5ea684a686a632b4bd1c77dde718bbd60c1a5328 100755 (executable)
@@ -108,13 +108,17 @@ function fetchRows($rs, $key = null) {
 function printErrors($err) { printList('err', $err); }
 function printMsgs($err) { printList('msg', $err); }
 
-function printList($class,$errArray) {
-    if (isset($errArray) && count($errArray)) {
-        echo '<div class="',$class,'"><ul>';
-        foreach($errArray as $err) {
-            echo '<li><p>',$err,'</p></li>';
+function printList($class,$err) {
+    if (is_array($err) && count($err)) {
+        echo '<div class="',$class,'">',(count($err)>1?'<ul>':'');
+        foreach($err as $e) {
+                       if (count($err)>1) {
+                               echo '<li><p>',$e,'</p></li>';
+                       } else {
+                               echo '<p>',$e,'</p>';
+                       }
         }
-        echo '</ul></div>';
+        echo (count($err)>1?'</ul>':''),'</div>';
     }
 }
 
This page took 0.026078 seconds and 4 git commands to generate.