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


PHP StudentInfo::setSex方法代码示例

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


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

示例1: GetStudentInfo

 function GetStudentInfo($zkzh)
 {
     $sql = "select * from t_StudentInfo where zkzh='{$zkzh}'";
     $sqlHelper = new SqlHelper();
     $arr = $sqlHelper->execute_dql2($sql);
     $sqlHelper->close_connect();
     // 二次封装,$arr=>StudentInfo对象实例
     $studentInfo = new StudentInfo();
     if (count($arr) > 0) {
         $studentInfo->setZkzh($arr[0]['zkzh']);
         $studentInfo->setName($arr[0]['name']);
         $studentInfo->setSex($arr[0]['sex']);
         $studentInfo->setKslb($arr[0]['kslb']);
         $studentInfo->setZzmm($arr[0]['zzmm']);
         $studentInfo->setNation($arr[0]['nation']);
         $studentInfo->setByxx($arr[0]['byxx']);
         $studentInfo->setHkszd($arr[0]['hkszd']);
         $studentInfo->setAddress($arr[0]['address']);
         $studentInfo->setTelephone($arr[0]['telephone']);
         $studentInfo->setZcxx($arr[0]['zcxx']);
         $studentInfo->setCardNumber($arr[0]['cardNumber']);
         $studentInfo->setXjh($arr[0]['xjh']);
         $studentInfo->setGysznj($arr[0]['gysznj']);
         $studentInfo->setGesznj($arr[0]['gesznj']);
         $studentInfo->setGssznj($arr[0]['gssznj']);
         $studentInfo->setMemo($arr[0]['memo']);
         $studentInfo->setPhoto($arr[0]['photo']);
     }
     return $studentInfo;
 }
开发者ID:otkinlife,项目名称:MyPhalcon,代码行数:30,代码来源:StudentInfoService.class.php

示例2: StudentInfoService

//创建了StudentInfoService实例
$studentInfoService = new StudentInfoService();
//根据action参数决定用户要执行什么样的操作
if (!empty($_REQUEST['action'])) {
    //接收action值
    $action = $_REQUEST['action'];
    if ($action == "add") {
        //说明用户希望执行添加学生信息信息
        $studentInfo = new StudentInfo();
        $array_studentInfo = $_POST["studentInfo"];
        /*处理图片上传*/
        require_once "../util/upload.class.php";
        require_once "../util/util.php";
        $studentInfo->setZkzh($array_studentInfo['zkzh']);
        $studentInfo->setName($array_studentInfo['name']);
        $studentInfo->setSex($array_studentInfo['sex']);
        $studentInfo->setKslb($array_studentInfo['kslb']);
        $studentInfo->setZzmm($array_studentInfo['zzmm']);
        $studentInfo->setNation($array_studentInfo['nation']);
        $studentInfo->setByxx($array_studentInfo['byxx']);
        $studentInfo->setHkszd($array_studentInfo['hkszd']);
        $studentInfo->setAddress($array_studentInfo['address']);
        $studentInfo->setTelephone($array_studentInfo['telephone']);
        $studentInfo->setZcxx($array_studentInfo['zcxx']);
        $studentInfo->setCardNumber($array_studentInfo['cardNumber']);
        $studentInfo->setXjh($array_studentInfo['xjh']);
        $studentInfo->setGysznj($array_studentInfo['gysznj']);
        $studentInfo->setGesznj($array_studentInfo['gesznj']);
        $studentInfo->setGssznj($array_studentInfo['gssznj']);
        $studentInfo->setMemo($array_studentInfo['memo']);
        $photo = "/upload/NoImage.jpg";
开发者ID:otkinlife,项目名称:MyPhalcon,代码行数:31,代码来源:StudentInfoAction.php


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