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


PHP Teacher::update方法代碼示例

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


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

示例1: photo_POST

function photo_POST($id)
{
    $teacher = new Teacher($id);
    $src = make_image('photo');
    $teacher->update('photo', $src);
    redirect("teacher/{$id}");
}
開發者ID:TheDenisNovikov,項目名稱:teacher,代碼行數:7,代碼來源:photo.php

示例2: edit_teacher_POST

function edit_teacher_POST($id)
{
    $description = _post('description');
    $teacher = new Teacher($id);
    if ($description) {
        $teacher->update('description', $description);
    }
    redirect("teacher/{$id}/edit");
}
開發者ID:TheDenisNovikov,項目名稱:teacher,代碼行數:9,代碼來源:edit_teacher.php

示例3: createPersonContext

 /**
  * Creates Indicate2 person context by teacher data
  *
  * @param array 			$teacherData 	Teacher data (intern)
  * @param boolean=true 	$dbAction 		Update person context id
  *
  * @return int
  * 
  * @throws Indicate2_Exception
  */
 public function createPersonContext($teacherData, $dbAction = true)
 {
     try {
         if (empty($this->_client)) {
             $this->connect();
         }
         $teacherPrefix = getTeacherPrefix();
         $teacherModel = new Teacher();
         // create request
         $createPersonContextRequest = array('CreatePersonContextRequest' => array('PersonContext' => array('Name' => $teacherModel->getNameByData($teacherData), 'Description' => ($divisionLongname = $teacherModel->getDivisionByData($teacherData)) ? $divisionLongname : '', 'Image' => $teacherData[$teacherPrefix . 'photo'], 'PageBreak' => false)));
         // call public function to create person context
         $response = $this->_client->__soapCall('CreatePersonContext', $createPersonContextRequest);
         if ($dbAction) {
             // write new person context id from indicate2 to teacher in tuevalon2
             $teacherModel->update(array($teacherPrefix . 'indicate2personcontextid' => intval($response->ContextId)), array($teacherPrefix . 'id = ' . intval($teacherData[$teacherPrefix . 'id']), $teacherPrefix . 'indicate2ws = ' . $teacherModel->getAdapter()->quote(getIndicate2WSDL()), $teacherPrefix . 'indicate2user = ' . $teacherModel->getAdapter()->quote(getIndicate2User())));
         }
         return $response->ContextId;
     } catch (Exception $e) {
         throw new Indicate2_Exception($e->getMessage());
     }
 }
開發者ID:omusico,項目名稱:wildfire_php,代碼行數:31,代碼來源:Indicate2Connect.php

示例4: Teacher

<?php

require_once "../init.php";
$teacher = new Teacher(new PDOdb("mysql:host=localhost;dbname=usjr", "root", ""));
$teacherid = $_POST['tchid'];
$teacherfname = $_POST['tchfname'];
$teachermname = $_POST['tchmname'];
$teacherlname = $_POST['tchlname'];
$teachertitle = $_POST['tchtitle'];
$teachertype = $_POST['tchtype'];
$result = $teacher->update(array('teacherfname' => $teacherfname, 'teachermname' => $teachermname, 'teacherlname' => $teacherlname, 'teachertitle' => $teachertitle, 'teachertype' => $teachertype), array('teacherid' => $teacherid), 1);
header('Location:teacherUpdateList.php');
開發者ID:rickyb1970,項目名稱:Rabsky,代碼行數:12,代碼來源:teacherUpdate.php


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