當前位置: 首頁>>代碼示例>>PHP>>正文


PHP db::DeleteData方法代碼示例

本文整理匯總了PHP中db::DeleteData方法的典型用法代碼示例。如果您正苦於以下問題:PHP db::DeleteData方法的具體用法?PHP db::DeleteData怎麽用?PHP db::DeleteData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在db的用法示例。


在下文中一共展示了db::DeleteData方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
require_once "includes/functions.php";
$objDb = new db();
$data = array();
if (isset($_GET["id"]) && $_GET["id"] != "" && $_GET["id"] != 1) {
    $sqlLanguage = "select * from job_language where id = " . $_GET["id"] . "";
    $resultLang = $objDb->ExecuteQuery($sqlLanguage);
    $rowCount = mysql_num_rows($resultLang);
    if ($rowCount == 1) {
        $rsLang = mysql_fetch_object($resultLang);
        delete_directory("../../langues/" . $rsLang->language_name . "/");
        $sql = "ALTER TABLE `language` DROP `" . $rsLang->language_shortname . "`";
        $result = $objDb->ExecuteQuery($sql);
        $objDb->DeleteData("job_language", "id", $_GET["id"]);
    }
}
header("location:index.php");
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:24,代碼來源:remove_language.php

示例2: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$objDb->DeleteData("job_vtutorials", "vt_id", $_GET["vtid"]);
header("location:tutorial_list.php");
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:11,代碼來源:tutorial_delete.php

示例3: GenerateXML

            if (isset($_POST["category_id"])) {
                $array["category_id"] = $_POST["category_id"];
            }
            if (isset($_POST["option_name"])) {
                $array["option_name"] = $_POST["option_name"];
            }
            $objDb->UpdateData("job_options", $array, "option_id", $_GET["oid"]);
            GenerateXML();
            if (isset($_GET["cat_id"]) && $_GET["cat_id"] != "") {
                header("location:option_add.php?cat_id=" . $_GET["cat_id"] . "&msg=edit&action=add");
            } else {
                header("location:option_add.php?msg=edit&action=add");
            }
        } else {
            if (isset($_GET["action"]) && $_GET["action"] == "delete") {
                $objDb->DeleteData("job_options", "option_id", $_GET["oid"]);
                GenerateXML();
                if (isset($_GET["cat_id"]) && $_GET["cat_id"] != "") {
                    header("location:option_add.php?cat_id=" . $_GET["cat_id"] . "&msg=delete&action=add");
                } else {
                    header("location:option_add.php?msg=delete&action=add");
                }
            }
        }
    }
}
function GenerateXML()
{
    echo $xmlfile_path = "../../xml/options.xml";
    $query_xmlw = "SELECT * FROM job_options ORDER BY category_id";
    $result_xmlw = mysql_query($query_xmlw);
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:31,代碼來源:option_add_action.php

示例4: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
require_once "../../classes/pagination.php";
require_once "../../includes/functions.php";
$objDb = new db();
$data = array();
if (isset($_GET["id"]) && $_GET["id"] != "") {
    $objDb->DeleteData("job_recruiter", "rec_id", $_GET["id"]);
} else {
    for ($i = 0; $i < count($_POST['chk']); $i++) {
        $objDb->DeleteData("job_recruiter", "rec_id", $_POST['chk'][$i]);
    }
}
$q_str = "";
if (isset($_GET["rec_status"]) && $_GET["rec_status"] != "") {
    $q_str = "rec_status=" . $_GET["rec_status"];
}
if (isset($_GET["cPage"]) && $_GET["cPage"] != "") {
    if ($q_str != "") {
        $q_str .= "&cPage=" . $_GET["cPage"];
    } else {
        $q_str = "cPage=" . $_GET["cPage"];
    }
}
header("location:employers_list.php?" . $q_str);
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:31,代碼來源:remove_rec.php

示例5: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
# This code is added to delete the voucher code
if (isset($_GET['delCode']) && $_GET['delCode'] == "delete") {
    $objDb->DeleteData("job_voucher_code", "code_id", $_GET["vid"]);
    header("location:code_list.php");
} else {
    $objDb->DeleteData("job_banner", "banner_id", $_GET["aid"]);
    header("location:banner_list.php");
}
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:17,代碼來源:banner_delete.php

示例6: while

        $resultpagename = $objDb->ExecuteQuery($sqlgetpagename);
        $pagenameresultrow = mysql_fetch_object($resultpagename);
        $filemidname = "PAGE_" . $pagenameresultrow->name;
    }
    $sqlgetvar = "select * from language where id = " . $_REQUEST['variableid'] . " limit 1";
    $result = $objDb->ExecuteQuery($sqlgetvar);
    $numrows = mysql_num_rows($result);
    if ($numrows > 0) {
        $languagevar = mysql_fetch_object($result);
        $sqlgetlan = "select * from job_language";
        $result1 = $objDb->ExecuteQuery($sqlgetlan);
        $numrows1 = mysql_num_rows($result1);
        if ($numrows1 > 0) {
            while ($langarr = mysql_fetch_object($result1)) {
                $filename = "../../langues/" . $langarr->language_name . "/" . $filemidname . "_" . $langarr->language_shortname . ".php";
                $variablename = $languagevar->name;
                $sname = $langarr->language_shortname;
                $valuename = $languagevar->{$sname};
                delete_language_variable_in_lang_file($filename, $variablename, $valuename);
            }
        }
        $objDb->DeleteData("language", "id", $_REQUEST['variableid']);
    }
}
if (isset($_REQUEST['cPage']) && !empty($_REQUEST['cPage'])) {
    //header("location:addlangvariable.php?cPage=".$_REQUEST['cPage']."");
    header("location:addlangvariable.php?cPage=" . $_REQUEST['cPage'] . "&page_id=" . $_REQUEST['page_id']);
} else {
    //header("location:addlangvariable.php");
    header("location:addlangvariable.php?page_id=" . $_REQUEST['page_id']);
}
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:31,代碼來源:remove_language_variable.php

示例7: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
$position = $_GET['position'];
$val = $_GET['val'];
$objDb = new db();
//echo $sql = "DELETE FROM job_grade_level WHERE ".$position." = ".$val; exit;
$objDb->DeleteData("job_grade_level", $position, $val);
$sql = "UPDATE job_grade_level SET " . $position . " = (" . $position . " - 1) WHERE " . $position . " <> 0";
$res1 = $objDb->ExecuteQuery($sql);
header("location:gradelevel_add.php");
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:16,代碼來源:gradelevel_delete.php

示例8: header

<?php

session_start();
if (!isset($_SESSION["user_id"])) {
    header("location: ../index.php");
    exit;
}
require_once "../../classes/db_class.php";
require_once "../../classes/pagination.php";
require_once "../../includes/functions.php";
$objDb = new db();
$data = array();
if (isset($_GET["id"]) && $_GET["id"] != "") {
    $objDb->DeleteData("job_jobseeker", "seeker_id", $_GET["id"]);
} else {
    for ($i = 0; $i < count($_POST['chk']); $i++) {
        $objDb->DeleteData("job_jobseeker", "seeker_id", $_POST['chk'][$i]);
    }
}
$q_str = "";
if (isset($_GET["seeker_status"]) && $_GET["seeker_status"] != "") {
    $q_str = "seeker_status=" . $_GET["seeker_status"];
}
if (isset($_GET["cPage"]) && $_GET["cPage"] != "") {
    if ($q_str != "") {
        $q_str .= "&cPage=" . $_GET["cPage"];
    } else {
        $q_str = "cPage=" . $_GET["cPage"];
    }
}
if ($q_str != "") {
開發者ID:beyondkeysystem,項目名稱:testone,代碼行數:31,代碼來源:remove_seeker.php


注:本文中的db::DeleteData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。