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


PHP Student::getStudentId方法代码示例

本文整理汇总了PHP中Student::getStudentId方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::getStudentId方法的具体用法?PHP Student::getStudentId怎么用?PHP Student::getStudentId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


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

示例1: update

 public function update(Student $object)
 {
     $q = "UPDATE " . self::TABLE . " SET `name`='" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "' WHERE studentId='" . addslashes($object->getStudentId()) . "'";
     $pk = $object->getStudentId();
     if ($object->isNew()) {
         if (empty($pk)) {
             $q = "INSERT INTO " . self::TABLE . " (`name`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "')";
         } else {
             $q = "INSERT INTO " . self::TABLE . " (`name`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getStudentId()) . "', '" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "')";
         }
     }
     $this->db->updateQuery($q);
     if (empty($pk)) {
         $pk = $this->db->selectQuery("SELECT studentId from " . self::TABLE . " ORDER BY studentId DESC limit 1")->getSingleton();
     }
     $result = $this->findByPrimaryKey($pk);
     parent::$dbCache->resetEntity("Student");
     parent::$dbCache->setSingle("Student", $pk, $result);
     return $result;
 }
开发者ID:aeberh,项目名称:php-movico,代码行数:20,代码来源:StudentPersistence.php

示例2: testFind

 function testFind()
 {
     //arrange
     $student_name = "Chemistry";
     $student_id = 1;
     $student_number = "2015-12-12";
     $test_student = new Student($student_name, $student_number, $student_id);
     $test_student->save();
     $student_name2 = "Underwater Basketweaving";
     $student_id2 = 2;
     $student_number2 = "2015-12-12";
     $test_student2 = new Student($student_name2, $student_number2, $student_id2);
     $test_student2->save();
     //act
     $result = Student::find($test_student->getStudentId());
     //assert
     $this->assertEquals($test_student, $result);
 }
开发者ID:juliocesardiaz,项目名称:UniRegisSwitch,代码行数:18,代码来源:StudentTest.php

示例3: explode

     $datos = explode("|", $linea);
     switch ($opcion) {
         case 1:
             $student = new Student($db);
             $id_student = $student->getStudentId($datos[1]);
             $debt_share = new DebtShare($db);
             $data = array(1, $id_student, $datos[0], $datos[3], $datos[4], $datos[5]);
             $id = $debt_share->insertDebtShare($data, $idTransaction);
             //adicionar la confirmacion o error del insert
             //adicionar registro de los logs
             $res = $id;
             //resultado final
             break;
         case 2:
             $student = new Student($db);
             $id_student = $student->getStudentId($datos[0]);
             $debt_share = new DebtShare($db);
             $data = array(2, $id_student, $datos[0], $datos[3], $datos[4], $datos[5]);
             //corregir esto la estructura de la tabla es diferente
             $id = $debt_share->insertDebtShare($data, $idTransaction);
             //adicionar la confirmacion o error del insert
             //adicionar registro de los logs
             $res = $id;
             //resultado final
             break;
     }
     $contador = $contador + 1;
 }
 if ($res > 0) {
     $msg = "<br>Total Registros Cargados: " . $contador;
     Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_UPLOAD"], $v_label["DETAIL_MESSAGE_OK_UPLOAD"] . $msg);
开发者ID:vicholuis,项目名称:proyectopruebalms,代码行数:31,代码来源:upload_debt_admin.php

示例4: setStudent

 /**
  * @param Student $Student
  */
 public function setStudent($Student)
 {
     $this->Student = $Student;
     $this->student_id = $Student->getStudentId();
 }
开发者ID:Abenezer,项目名称:SchoolManagmentWithApi,代码行数:8,代码来源:Enrollment.php

示例5:

				<input id="firstN" size="30" maxlength="50" type="text" name="firstN" required value=<?php 
echo $student->getFirstName();
?>
>
			</div>
			<div class="field">
				<label for="lastN">Last Name</label>
				<input id="lastN" size="30" maxlength="50" type="text" name="lastN" required value=<?php 
echo $student->getLastName();
?>
>
			</div>
			<div class="field">
				<label for="studID">Student ID</label>
				<input id="studID" size="30" maxlength="7" type="text" pattern="[A-Za-z]{2}[0-9]{5}" title="AB12345" name="studID" disabled value=<?php 
echo $student->getStudentId();
?>
>
			</div>
			<div class="field">
				<label for="email">E-mail</label>
				<input id="email" size="30" maxlength="255" type="email" name="email" required value=<?php 
echo $student->getEmail();
?>
>
			</div>
			<div class="field">
					<label for="major">Major</label>
					<select id="major" name = "major">
					<option <?php 
if ($student->getMajor() == 'CMPE') {
开发者ID:jb-aero,项目名称:Project2,代码行数:31,代码来源:06StudEditInfo.php


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