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