当前位置: 首页>>代码示例>>PHP>>正文


PHP updateRecord函数代码示例

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


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


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