php mysql数据库内容未突然显示

6kkfgxo0  于 2021-06-24  发布在  Mysql
关注(0)|答案(1)|浏览(332)

我已经找了很长一段时间的错误,但似乎我不能找出,什么是错误的。我是一名在职学生,在市场营销的主席,我们有自己的主页,维护是我的工作。几年前就有人写过代码,到目前为止还没有出现问题。但今天,我注意到数据库内容突然没有显示在我们的主页上。这是我的代码,希望你能帮我找出问题。

<div id="gContent">

        <?php include("inc/navmain.inc"); ?>
        <?php include ("v2/db/db.php"); ?>
    <?php 
    $sql_ueber = "SELECT ". 
                "ws.*, p.*". 
            "FROM ". 
                "workshop ws, coeContacts p ". 
            "WHERE ". 
                "(ws.Umkreis = 'ueber' AND ws.KontaktPerson = p.id)ORDER BY -ws.Anfang DESC";

    $sql_muenster = "SELECT ". 
                "ws.*, p.*". 
            "FROM ". 
                "workshop ws, coeContacts p ". 
            "WHERE ". 
                "(ws.Umkreis = 'reg_muenster' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC";

    $sql_berlin = "SELECT ". 
                "ws.*, p.*". 
            "FROM ". 
                "workshop ws, coeContacts p ". 
            "WHERE ". 
                "(ws.Umkreis = 'reg_berlin' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC"; 

    $sql_koeln = "SELECT ". 
                "ws.*, p.*". 
            "FROM ". 
                "workshop ws, coeContacts p ". 
            "WHERE ". 
                "(ws.Umkreis = 'reg_koeln' AND ws.KontaktPerson = p.id) ORDER BY -ws.Anfang DESC";      

    $result_ueber = mysql_query ($sql_ueber); 
    $result_muenster = mysql_query ($sql_muenster); 
    $result_berlin = mysql_query ($sql_berlin);
    $result_koeln = mysql_query ($sql_koeln);

    ?>

    <script src="js/jquery-1.7.1.min.js"></script>
     <!--Script zum Anzeigen der Infos pro Uni und zum aktualisieren des Submen¸s -->
     <script>
     function toggleMe(info, link){
      var ids = ["table_Ueberregional", "table_Muenster", "table_Berlin","table_Koeln"];
      var infLink = ["termineUberregional", "termineMuenster", "termineBerlin","termineKoeln"];
      var length = ids.length;
      for(var i=0; i < length; i++){
        document.getElementById(ids[i]).style.display="none";
        $("#" + infLink[i]).removeClass("active");
      }
        document.getElementById(info).style.display="block";
        $("#" + link).addClass("active");
      return true;
    }
 $(document).ready(function(){
    $("#termineUberregional").click(function(event){
      toggleMe('table_Ueberregional','termineUberregional');
      });

    $("#termineMuenster").click(function(event){
      toggleMe('table_Muenster','termineMuenster');
        });
    $("#termineBerlin").click(function(event){
      toggleMe('table_Berlin','termineBerlin');
        });
        $("#termineBerlin").click(function(event){
      toggleMe('table_Berlin','termineBerlin');
        });

        $("#termineKoeln").click(function(event){
      toggleMe('table_Koeln','termineKoeln');
      });
    });
    </script>

            <div id="table_Berlin" style="display:none">
                <h1>Termine f&uuml;r Berlin</h1>
                <table id="table_termine">
                <th>Kooperationspartner</th><th>Zeitraum</th><th>Ansprechpartner</th><th>Anhang</th>
                <?php 
                    while($data = mysql_fetch_array($result_berlin) ) {
                    if($data["Umkreis"] != "reg_berlin"){
                        continue 1;
                    }
                        else{
                            echo '<tr>';
                            echo '<td>';
                                echo $data["Partner"];
                            echo '</td>';
                            echo '<td>';
                                if($data["Anfang"]){
                                    echo date('d/m/Y',strtotime($data["Anfang"])). ' - ';
                                    if($data["Ende"]){
                                        echo date('d/m/Y',strtotime($data["Ende"])) ;
                                    }
                                }
                                else {
                                    echo 'Ank&uuml;ndigung folgt';
                                }
                            echo '</td>';
                            echo '<td>';
                                echo '<a href="mailto:'.$data["email"]. '">'. $data["First_Name"]. " " . $data["Last_Name"];
                            echo '</td>';
                            echo '<td>';
                            if($data["Anhang"] == "N/A"){
                                echo "";
                            }
                            else {
                                echo '<a href="upload/'.$data["Anhang"].'" target="_blank"><img src="images/pdf_icon.gif" height="18px" width="18px"/></a>';
                            }
                            echo '</td>';
                            echo '</tr>';
                        }
                    };
                ?>
                </table>
                <p class="information">Nur CoEM-Studierende der Hochschule Berlin k&ouml;nnen sich f&uuml;r diese Workshops anmelden. Die Workshops werden bestm&ouml;glich nach Pr&auml;ferenz zugewiesen.</p>
            </div>
6pp0gazn

6pp0gazn1#

display:none

这就是问题所在,解决它。

相关问题