• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updateRecord函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中updateRecord函数的典型用法代码示例。如果您正苦于以下问题:PHP updateRecord函数的具体用法?PHP updateRecord怎么用?PHP updateRecord使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了updateRecord函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: provaUpdateStatus

function provaUpdateStatus($id, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('provas', $fields, 'id_prova = ' . dbInteger($id));
    if ($status == 'X') {
        $fields = array();
        $fields['status'] = dbString('X');
        updateRecord('provas_classificacoes', $fields, 'id_prova = ' . dbInteger($id));
    }
}
开发者ID:ricain59,项目名称:fortaff,代码行数:11,代码来源:provas.php


示例2: equipaUpdateStatus

function equipaUpdateStatus($id, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('equipas', $fields, 'id_equipa = ' . dbInteger($id));
    if ($status == 'X') {
        $fields = array();
        $fields['status'] = dbString('X');
        updateRecord('elementos_equipas', $fields, 'id_equipa = ' . dbInteger($id));
    }
}
开发者ID:ricain59,项目名称:fortaff,代码行数:11,代码来源:equipas.php


示例3: delegacaoUpdateStatus

function delegacaoUpdateStatus($id, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('delegacoes', $fields, 'id_delegacao = ' . dbInteger($id));
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:delegacoes.php


示例4: deleteFromNavi

                    $acc = $am->getAccountById($ID);
                    //delete all transactions in this account
                    $acc->deleteAllTransactions();
                    //delete account
                    $am->deleteAccount($ID);
                    //delete entry in navigation
                    deleteFromNavi($us->getProperty("accountNaviId_{$ID}"));
                }
            } else {
                echo "no ID was transmitted!";
            }
            break;
        case 'save':
            //add record, update record
            if (isset($_POST['hiddenID'])) {
                updateRecord();
            } else {
                header("Location: {$redirectPageAfterSave}");
            }
            break;
        case 'new':
        case 'edit':
            //frontend form for edit or insert
            printFrontend();
            break;
    }
}
require_once BADGER_ROOT . "/includes/fileFooter.php";
function printFrontend()
{
    global $pageTitle;
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:AccountManager.php


示例5: encomendasUpdate

function encomendasUpdate($fields)
{
    $where = "pp_enc_id = " . dbString($fields['pp_enc_id']);
    unset($fields['pp_enc_id']);
    updateRecord("pp_encomendas", $fields, $where);
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:pp_encomendas.php


示例6: textwrap

        print "<td>" . textwrap($record['team']) . "</td>";
        print "<td>" . textwrap($record['name']) . "</td>";
        print "<td>" . textwrap($record['place']) . "</td>";
        print "<td>" . textwrap($record['place_detail']) . "</td>";
        print "<td>" . textwrap($record['stored_date']) . "</td>";
        $class = $record['checked'] == 1 ? "checked" : "notchecked";
        print "<td class=" . $class . ">" . textwrap($record['date']) . "</td>";
        print "<td class=" . $class . ">" . textwrap($record['check_person']) . "</td>";
        //print("<td class=".$class.">".textwrap($record['checked'])."</td>");
        print "</tr>\n";
    }
    print "</table>\n";
    $db->close();
}
if (isset($iv_number) and isset($iv_checked) and isset($iv_user)) {
    updateRecord($iv_number, $iv_checked, $iv_user);
    header("Location: " . $_SERVER['PHP_SELF']);
    exit;
}
?>
</head>

<body>
<h1>Welcome to Iventory Server</h1>
<div class="getapp">
<a class="getapp" href="./qrreader.apk">Get Android App!</a>
</div>
<div>
<form action="./index.php" method="get">
  User : <input class="text" type="text" name="user" size="10" maxlength="8"/>
  Number : <input class="text" type="text" name="number" size="10" maxlength="8"/>
开发者ID:sc4brain,项目名称:ManageInventory,代码行数:31,代码来源:index.php


示例7: count

} else {
    $defaultDataId = 0;
}
if (isset($_REQUEST["msg"])) {
    $msg = $_REQUEST["msg"];
} else {
    $msg = "";
}
$table = $_REQUEST["table"];
if (isset($prevTable) && is_array($prevTable)) {
    $numPendingTables = count($prevTable);
} else {
    $numPendingTables = 0;
}
if (isset($_REQUEST[$table])) {
    list($success, $msg, $id) = updateRecord($db, $table, $d[$table], $updateId);
    if ($success) {
        unset($d[$table]);
        if ($numPendingTables > 0) {
            // pop one off the previous table stack.
            $table = array_pop($prevTable);
        }
        if (isset($extras["returnURL"]) && $numPendingTables == 0) {
            if (strpos(urldecode($extras["returnURL"]), '?') === FALSE) {
                $urlChar = "?";
            } else {
                $urlChar = "&";
            }
            if (isset($extras["returnIdName"])) {
                header("Location: " . $returnURL . $urlChar . $extras["returnIdName"] . "=" . $id);
            } else {
开发者ID:racheldenison,项目名称:megavista,代码行数:31,代码来源:buildNewStudy.php


示例8: recheioUpdate

function recheioUpdate($fields)
{
    $where = "pp_recheio_id = " . dbString($fields['pp_recheio_id']);
    unset($fields['pp_recheio_id']);
    updateRecord("pp_recheio", $fields, $where);
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:pp_recheio.php


示例9: doUpdate

function doUpdate()
{
    $uid = substr($_GET['uid'], strlen('event-'));
    $oldCalName = $_GET['oldCalName'];
    $calName = $_GET['calName'];
    $eventStart = $_GET['eventStart'];
    $eventEnd = $_GET['eventEnd'];
    $eventText = $_GET['eventText'];
    if ($calName == null) {
        return "failed\nno calendar name";
    }
    if ($uid == '' && ($eventStart == null || $eventEnd == null)) {
        return "failed\nno start/end date";
    }
    if ($uid == '' && $eventText == '') {
        return "success\nhaven't created event because text is empty";
    }
    if ($oldCalName != null) {
        // we have an old calendar, so move event from that cal to $calName
        // read in old cal
        // get event from old cal
        // read in new cal
        // append event
    }
    $filename = CALENDAR_DIR . $calName . '.ics';
    // backup calendar
    if (!copy($filename, $filename . '.bak')) {
        return "failed\nunable to backup calendar: {$filename}";
    }
    //   get calendar file specified
    if (!is_writable($filename)) {
        return "failed\ncalendar is not writeable: {$filename}";
    }
    $lines = file($filename);
    if ($lines === FALSE) {
        return "failed\nunable to read in calendar: {$filename}";
    }
    $handle = fopen($filename, 'w');
    if ($handle == null) {
        return "failed\nunable to open calendar file for writing: {$filename}";
    }
    $result = "failed:\nunknown reason";
    if ($uid == '') {
        $uid = uniqid('MONKET-', true);
        //   create ical record
        $record = "";
        $record .= "BEGIN:VEVENT\n";
        $record .= "DTSTART;VALUE=DATE:" . $eventStart . "\n";
        $record .= "DTEND;VALUE=DATE:" . $eventEnd . "\n";
        $record .= "SUMMARY:" . $eventText . "\n";
        $record .= "UID:" . $uid . "\n";
        $record .= "DTSTAMP:" . date('Ymd\\THis') . "\n";
        $record .= "END:VEVENT\n";
        $result = "failed\ndid not write record";
        foreach ($lines as $line) {
            if (trim($line) == 'END:VCALENDAR') {
                $result = 'success' . "\n" . $uid;
                fputs($handle, $record);
            }
            fputs($handle, $line);
        }
    } else {
        $result = "failed\nunable to edit event";
        $record = null;
        foreach ($lines as $line) {
            $value = trim($line);
            if ($value == 'BEGIN:VEVENT') {
                $record = $line;
            } else {
                if (startsWith($value, 'UID:')) {
                    $record .= $line;
                    $recordUid = trim(substr($value, strlen('UID:')));
                } else {
                    if ($value == 'END:VEVENT') {
                        $record .= $line;
                        if ($uid == $recordUid) {
                            $record = updateRecord($record, $eventText, $eventStart, $eventEnd);
                        }
                        fputs($handle, $record);
                        $record = null;
                        $recordUid = null;
                        $result = "success";
                    } else {
                        if ($record !== null) {
                            $record .= $line;
                        } else {
                            fputs($handle, $line);
                        }
                    }
                }
            }
        }
    }
    fclose($handle);
    echo $result;
}
开发者ID:dalinhuang,项目名称:sutoj,代码行数:96,代码来源:monket-cal-update.php


示例10: getBadgerTranslation2

require_once BADGER_ROOT . '/modules/account/PlannedTransaction.class.php';
require_once BADGER_ROOT . '/modules/account/accountCommon.php';
$redirectPage = "";
$pageTitle = getBadgerTranslation2('accountTransaction', 'pageTitle');
$am = new AccountManager($badgerDb);
$catm = new CategoryManager($badgerDb);
if (isset($_GET['action'])) {
    switch (getGPC($_GET, 'action')) {
        case 'delete':
            deleteRecord();
            break;
        case 'save':
            $accountID = getGPC($_POST, 'hiddenAccID', 'integer');
            if (isset($_POST['hiddenID'])) {
                //add record, update record
                updateRecord($accountID, getGPC($_POST, 'hiddenID'), getGPC($_POST, 'hiddenType'));
                $redirectPage = getRedirectPage($accountID);
                header("Location: {$redirectPage}");
            }
            break;
        case 'new':
        case 'edit':
            //frontend form for edit or insert
            if (isset($_GET['accountID'])) {
                // account was selected previously
                $accountID = getGPC($_GET, 'accountID', 'integer');
                $redirectPage = getRedirectPage($accountID);
            } else {
                // no account was selected previously
                // -> user has to choose one
                $accountID = "choose";
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:Transaction.php


示例11: include

<?
include('dbconfig.php');
include('library.php');
connect2DB(); // as per values specified in config file

if ( isset($_GET['order']) )
{
	$query = "SELECT * FROM orders WHERE orders_id ='" . $_GET['order'] . "'";
	if ( recordExists($query) )
	{
		// Update the record
		$query = "UPDATE orders SET abo_status = '0', orders_status = '1' WHERE orders_id ='" . $_GET['order'] . "'";
		if (updateRecord($query) )
		{
			echo "Order " . $_GET['order'] . " geinitialiseerd.";
		}
		else
		{
			echo "Er deed zich een fout voor, gelieve opnieuw te proberen.";
		}
	}
	else
	{
		echo "Er is geen order gevonden met id " . $_GET['order'];
	}
}
else
{
	echo "Gelieve een order nummer in te geven.";
}
?>
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:31,代码来源:releaseorder.php


示例12: GetValue

    } else {
        echo '<td>&nbsp;</td>';
    }
}
?>
	
								  </tr>
								  <tr><td>&nbsp;</td></tr>
								  <tr><td>WB</td>
										<?php 
for ($val = 1; $val < 6; $val++) {
    if ($val == 5) {
        $r_name = GetValue('addressname', 'register', 'address="' . $col1 . '"');
        echo '<td id="wb_value">' . $r_name . ": " . $str . '</td>';
        $arrVal['updatedvalue'] = $str;
        updateRecord($arrVal, 'register', "addressname='{$r_name}'");
    } else {
        echo '<td>&nbsp;</td>';
    }
}
?>
</tr>-->

		<!--</table>
	</td>
	</tr>-->
</table>
</div>
</body>
<?php 
function updateRecord($arrayValues, $table, $condition, $autoCommit = "yes")
开发者ID:jimmarv,项目名称:comparch,代码行数:31,代码来源:changeregs.php


示例13: provaClassificacaoUpdateStatus

function provaClassificacaoUpdateStatus($id_classificacao, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('provas_classificacoes', $fields, 'id_classificacao = ' . dbInteger($id_classificacao));
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:provas_classificacoes.php


示例14: elementoEquipaUpdateStatus

function elementoEquipaUpdateStatus($id_elemento_equipa, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('elementos_equipas', $fields, 'id_elemento_equipa = ' . dbInteger($id_elemento_equipa));
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:elementosequipas.php


示例15: insertRecord

function insertRecord($rtyID = null)
{
    // check if there is preference for OwnerGroup and visibility
    $addRecDefaults = getDefaultOwnerAndibility($_REQUEST);
    $usrID = get_user_id();
    // Try to insert anything in POST as details of a new Record.
    // We do this by creating a stub record, and then updating it.
    mysql__insert("Records", array("rec_Added" => date('Y-m-d H:i:s'), "rec_AddedByUGrpID" => get_user_id(), "rec_RecTypeID" => intval($rtyID), "rec_ScratchPad" => @$_REQUEST["notes"] ? $_REQUEST["notes"] : null, "rec_OwnerUGrpID" => $addRecDefaults[1], "rec_NonOwnerVisibility" => $addRecDefaults[2], "rec_URL" => @$_REQUEST["rec_url"] ? $_REQUEST["rec_url"] : ""));
    $_REQUEST["recID"] = $recID = mysql_insert_id();
    if ($recID) {
        if ($usrID) {
            mysql__insert('usrBookmarks', array('bkm_recID' => $recID, 'bkm_Added' => date('Y-m-d H:i:s'), 'bkm_Modified' => date('Y-m-d H:i:s'), 'bkm_UGrpID' => $usrID));
        }
        updateRecord($recID, $rtyID);
        return true;
    } else {
        return false;
    }
}
开发者ID:HeuristNetwork,项目名称:heurist,代码行数:19,代码来源:saveRecordDetails.php


示例16: reparadorUpdate

function reparadorUpdate($fields)
{
    $where = "rep_id = " . dbString($fields['rep_id']);
    unset($fields['rep_id']);
    updateRecord("reparador", $fields, $where);
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:dbreparador.php


示例17: visitanteUpdateStatus

function visitanteUpdateStatus($id, $status)
{
    $fields = array();
    $fields['status'] = dbString($status);
    updateRecord('visitantes', $fields, 'id_visitante = ' . dbInteger($id));
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:visitantes.php


示例18: modifBolosUpdate

function modifBolosUpdate($fields)
{
    $where = "pp_modif_id = " . dbString($fields['pp_modif_id']);
    unset($fields['pp_modif_id']);
    updateRecord("pp_modif_bolos", $fields, $where);
}
开发者ID:ricain59,项目名称:fortaff,代码行数:6,代码来源:pp_modif_bolos.php


示例19: securePage

//user must be logged-in to view this page
securePage();
// include no cache headers
include $path_to_dynamik . "no_cache.inc.php";
// include format functions
include $path_to_dynamik . "format_functions.inc.php";
// include form functions
include $path_to_dynamik . "form_functions.inc.php";
// include DB fetch functions
include $path_to_dynamik . "db_fetch_fncs.inc.php";
// include DB data manipulation functions
include $path_to_dynamik . "db_ops_fncs.inc.php";
// init variables
$order = trim($_POST["order"]);
// init page va
$listings_page = "index.php";
// make sure that an order list is set
if ($order == "") {
    header("Location: " . $listings_page);
    exit;
}
// go through the array of ids in the order they've been reassigned in, and update each record in [employees]
$new_order_array = explode("|", $order);
// loop through array
for ($i = 0; $i < sizeof($new_order_array); $i++) {
    // define query to update
    updateRecord("rentals", "rank = " . intval($i + 1), "id = '" . intval($new_order_array[$i]) . "' ");
}
// send to main page
header("Location: index.php?action=edit&result=update");
exit;
开发者ID:alejandrozepeda,项目名称:gvm,代码行数:31,代码来源:rentals_shift.php


示例20: ob_start

<?php

ob_start();
session_start();
$table = isset($_POST['table']) ? htmlentities($_POST['table']) : "";
$condition = isset($_POST['condition']) ? $_POST['condition'] : "";
$fields = isset($_POST['fields']) ? $_POST['fields'] : "";
$datetime = date("Y-m-d H:i:s");
$update_info = $fields;
$update_info['updatedate'] = $datetime;
$return = updateRecord($update_info, $table, stripslashes($condition));
echo $return;
ob_end_flush();
function isHexadecimalString($str)
{
    if (preg_match("/^[a-f0-9]{1,}\$/is", $str)) {
        return 1;
    } else {
        return 0;
    }
}
function updateRecord($arrayValues, $table, $condition, $autoCommit = "yes")
{
    include_once 'connection.php';
    mysqli_autocommit($conn, false);
    $table_value = "";
    if (empty($arrayValues)) {
        echo "Incomplete Parameters Passed";
        die;
    }
    if (!is_array($arrayValues)) {
开发者ID:jimmarv,项目名称:comparch,代码行数:31,代码来源:save_instructions.php



注:本文中的updateRecord函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updateSetting函数代码示例发布时间:2022-05-23
下一篇:
PHP updateQuery函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap