当前位置: 首页>>代码示例>>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;未经允许,请勿转载。