熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> PHP編程 >> 正文

PHP網絡開發詳解:文章類別管理頁面的實現[3]

2022-06-13   來源: PHP編程 
    ——此文章摘自《完全手冊PHP網絡開發詳解》定價 特價 詳細>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave>

      //同時刪除articles表中的相應記錄
      $deleteSQL = sprintf(DELETE FROM articles WHERE type_id=%s
                           GetSQLValueString($_GET[MM_delete] int));
      mysql_select_db($database_conn $conn);
      $Result = mysql_query($deleteSQL $conn) or die(mysql_error());
     
      echo <script>alert(類別刪除成功!);</script>;
    }
    //定義用於記錄更新的結果集
    if (isset($_GET[type_id]))
    {
        mysql_select_db($database_conn $conn);
        $query_rs_upt_type = sprintf(SELECT * FROM types WHERE type_id = %s
    $_GET[type_id]);
        $rs_upt_type = mysql_query($query_rs_upt_type $conn) or die(mysql_error());
        $row_rs_upt_type = mysql_fetch_assoc($rs_upt_type);
        $totalRows_rs_upt_type = mysql_num_rows($rs_upt_type);
        $row_rs_upt_type_id = $row_rs_upt_type[type_id];
        $row_rs_upt_type_name = $row_rs_upt_type[type_name];
    }
    //定義用於類別列表的結果集
    mysql_select_db($database_conn $conn);
    $query_rs_all_types = SELECT * FROM types ORDER BY type_id ASC;
    $rs_all_types = mysql_query($query_rs_all_types $conn) or die(mysql_error());
    $row_rs_all_types = mysql_fetch_assoc($rs_all_types);
    $totalRows_rs_all_types = mysql_num_rows($rs_all_types);
    ?>
    <!DOCTYPE HTML PUBLIC //WC//DTD HTML Transitional//EN http://
    wwwworg/TR/html/loosedtd>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta httpequiv=ContentType content=text/html; charset=gb>
    <style type=text/css>
    <!
    style {
        fontsize: px;
        fontweight: bold;
    }
    style {fontsize: px}
    >
    </style>
    </head>

[http://developcsaicn/web/htm>]  [http://developcsaicn/web/htm>]  []  [http://developcsaicn/web/htm>]  [http://developcsaicn/web/htm>]  


From:http://tw.wingwit.com/Article/program/PHP/201311/21380.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.