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


PHP medoo::max方法代码示例

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


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

示例1: max

 /**
  * @param      $table
  * @param      $column
  * @param null $where
  * @return int
  */
 public function max($table, $column, $where = NULL)
 {
     if (empty($this->_reader)) {
         return $this->_writer->max($table, $column, $where);
     } else {
         return $this->_reader->max($table, $column, $where);
     }
 }
开发者ID:dalinhuang,项目名称:StudentManage,代码行数:14,代码来源:sql.php

示例2: medoo

//todo,改变meting表中会议状态validity
// todo,inform 中增加一项
//todo,1,attendence中检索meeting id,2,对应状态state设置为0 无效,3,对应user id写成新的notice,4,并将user表中的mes改为当前inform_id
$mid = $_POST['id'];
session_start();
$id = $_SESSION['uid'];
include '../../parameter/Medoo/Resource/medoo.php';
//meeting
$db = new medoo('meetingmanage');
$db->update('meeting', array('VALIDITY' => 1), array('MEETING_ID' => $mid));
//
////inform
$re = $db->select('inform', 'CONTENT', array('MEETING_ID' => 40002));
$content = $re[0];
$new_mes = "注意:关于【" . $content . "】的会议已经取消,请您确认信息!";
$iid = $db->max('inform', 'INFORM_ID');
$iid += 1;
$date = date("Y/m/d");
$db->insert("inform", array('INFORM_ID' => $iid, 'USER_ID' => $id, 'DATE' => $date, 'CONTENT' => $new_mes, 'MEETING_ID' => $mid));
//attendence
//获得user列表
$users = $db->select('attendence', 'USER_ID', array('MEETING_ID' => 40000));
//跟新参会状态
$db->update('attendence', array('STATE' => 0), array('MEETING_ID' => $mid));
//notice & user
$num = count($users);
$nid = $db->max('notice', 'NOTICE_ID');
$nid += 1;
for ($i = 0; $i < $num; $i++) {
    $db->insert('notice', array('NOTICE_ID' => $nid, 'USER_ID' => $users[$i], 'INFORM_ID' => $iid, 'STATE' => 0));
    $db->update('user', array('MES' => $iid), array('USER_ID' => $users[$i]));
开发者ID:keensting,项目名称:MeetingManageSystem,代码行数:31,代码来源:ajax_unsubscribe_meeting.php

示例3: medoo

<?php

/**
 * Created by PhpStorm.
 * User: KeenSting
 * Date: 2015/7/8
 * Time: 12:30
 */
include './parameter/Medoo/Resource/medoo.php';
$num = $_POST['num'];
$space = $_POST['space'];
$ppt = $_POST['ppt'];
$mic = $_POST['mic'];
$board = $_POST['board'];
$mydb = new medoo('meetingmanage');
$id = $mydb->max('rooms', 'ROOM_ID');
$mydb->insert('rooms', array('ROOM_ID' => $id + 1, 'NUM' => $num, 'SPACE' => $space, 'ONE1' => 0, 'ONE2' => 0, 'ONE3' => 0, 'ONE4' => 0, 'ONE5' => 0, 'ONE6' => 0, 'TWO1' => 0, 'TWO2' => 0, 'TWO3' => 0, 'TWO4' => 0, 'TWO5' => 0, 'TWO6' => 0, 'THREE1' => 0, 'THREE2' => 0, 'THREE3' => 0, 'THREE4' => 0, 'THREE5' => 0, 'THREE6' => 0, 'MIC' => $mic, 'PPT' => $ppt, 'BOARD' => $board, 'STATE' => 1));
?>
<html>
<head>

</head>
<body style="background-color: #ffffff;">
<script>
    alert('新的会议室已添加!');
</script>
</body>
<meta http-equiv="refresh" content="1;url='./meetingroom.php'">

</html>
开发者ID:keensting,项目名称:MeetingManageSystem,代码行数:30,代码来源:deal_add_room_require.php

示例4: medoo

/**
 * Created by PhpStorm.
 * User: KeenSting
 * Date: 2015/7/8
 * Time: 11:53
 */
require_once './parameter/Medoo/Resource/medoo.php';
$name = $_POST['name'];
$sex = $_POST['sex'];
$dep = $_POST['depart'];
$pos = $_POST['position'];
$tel = $_POST['tel'];
$mail = $_POST['mail'];
$mydb = new medoo('meetingmanage');
$id = $mydb->max('user', 'USER_ID');
$mydb->insert('user', array('USER_ID' => $id + 1, 'EMAIL' => $mail, 'PHONE' => $tel, 'NAME' => $tel, 'REAL_NAME' => $name, 'PWD' => $tel, 'IDENTY' => $pos, 'HEAD_IMG' => './assert/user/headimg/4.jpg', 'SEX' => $sex, 'DEPART_ID' => $dep, 'STATE' => 1, 'MES' => 0));
?>
<html>
<head>

</head>
    <body>
        <script>
            alert('员工信息已添加,手机号即为登录账号和密码!');
        </script>
    </body>
    <meta http-equiv="refresh" content="1;url='./addperson.php'">

</html>
开发者ID:keensting,项目名称:MeetingManageSystem,代码行数:29,代码来源:deal_add_person_require.php

示例5: remove_nbsp

<?php

ini_set('odbc.defaultlrl', '1024000');
require 'conf.php';
for ($i = 0; $i <= 200; $i++) {
    $newmysqldb = new medoo(['server' => '127.0.0.1', 'username' => 'root', 'password' => '', 'database_name' => 'lianchuangcms', 'port' => 3306]);
    $maxid = $newmysqldb->max('news', 'id');
    $maxid == false && ($maxid = 0);
    //文章表
    $sql = 'SELECT TOP(5000) ID,ClassID,Title,keyword,OrderID,Attribute,UserID,CreateDate,UpdateDate,CONVERT(text,Content) as Content,DefaultPic,FromWeb,filename FROM Word where ID >' . $maxid . ' ORDER BY ID ASC';
    $exec = odbc_exec($mssqldb, $sql);
    while ($row = odbc_fetch_array($exec)) {
        $content = trim(mb_convert_encoding(trim($row['Content']), "UTF-8", "GBK"));
        $insertid = $newmysqldb->insert('news', ['id' => str_replace('.0', '', $row['ID']), 'catid' => str_replace('.0', '', $row['ClassID']), 'title' => trim(str_replace("&nbsp;", '', remove_nbsp(mb_convert_encoding($row['Title'], "UTF-8", "GBK")))), 'keywords' => trim(remove_nbsp(mb_convert_encoding($row['keyword'], "UTF-8", "GBK"))), 'description' => trim(str_replace("&nbsp;", '', remove_nbsp(mb_substr(strip_tags($content), 0, 78, 'UTF-8')))), 'listorder' => str_replace('.0', '', $row['OrderID']), 'attribute' => intval($row['Attribute']), 'uid' => str_replace('.0', '', $row['UserID']), 'username' => '', 'url' => '', 'islink' => 0, 'inputtime' => strtotime($row['CreateDate']), 'updatetime' => strtotime($row['UpdateDate']), 'status' => 99]);
        $newmysqldb->insert('news_data', ['id' => str_replace('.0', '', $row['ID']), 'content' => addslashes(stripslashes($content)), 'defaultpic' => $row['DefaultPic'], 'fromweb' => $row['FromWeb'], 'filename' => $row['filename']]);
        echo 'insert article success id is ' . $row['ID'] . PHP_EOL;
    }
}
function remove_nbsp($str)
{
    $str = mb_ereg_replace('^( | )+', '', $str);
    $str = mb_ereg_replace('( | )+$', '', $str);
    $str = mb_ereg_replace('  ', "\n  ", $str);
    $order = array("\r\n", "\n", "\r");
    $replace = '<br/>';
    $str = str_replace($order, $replace, $str);
    return $str;
}
开发者ID:290329416,项目名称:guahao,代码行数:28,代码来源:convert_word.php

示例6: medoo

} else {
    if (file_exists("assert/docs/" . $_FILES["file"]["name"])) {
        echo $_FILES["file"]["name"] . " already exists. ";
    } else {
        $name = $_FILES['file']['name'];
        $path = "./assert/docs/" . $_FILES["file"]["name"];
        move_uploaded_file($_FILES["file"]["tmp_name"], "assert/docs/" . $_FILES["file"]["name"]);
    }
}
//}
//else{
//    echo "文件不合法!";
//}
$type = $_POST['type'];
$db = new medoo('meetingmanage');
$did = $db->max('docspace', 'DOC_ID');
$did += 1;
$db->insert('docspace', array('DOC_ID' => $did, 'MEETING_ID' => $mid, 'TYPE' => $type, 'DATE' => date("Y/m/d"), 'PATH' => $path, 'NAME' => $name));
?>
<html>
<head>

</head>
<body style="background:#ffffff">
<script type="text/javascript">
    alert('文件上传成功!')

</script>
    <meta http-equiv="refresh"  content="100;url='./mymeeting.php'"/>

</body>
开发者ID:keensting,项目名称:MeetingManageSystem,代码行数:31,代码来源:uploadDeal.php

示例7: medoo

                return true;
            }
        }
    </script>
    <?php 
include './parameter/Medoo/Resource/medoo.php';
$name = '';
$describe = '';
$phone = '';
if (!$_POST) {
} else {
    $db = new medoo('meetingmanage');
    $name = $_POST['name'];
    $phone = $_POST['phone'];
    $describe = $_POST['info'];
    $did = $db->max('departs', 'DEPART_ID');
    $did += 1;
    //depart id
    $db->insert('departs', array('DEPART_ID' => $did, 'NAME' => $name, 'PHONE' => $phone, 'INSTRUCTION' => $describe));
    ?>
        <script>
            alert("添加成功!");
            document.location.href='./addDepart.php';
        </script>
    <?php 
}
?>
</head>
<body>
    <div class="container">
        <div class="page-header">
开发者ID:keensting,项目名称:MeetingManageSystem,代码行数:31,代码来源:addDepart.php

示例8: classe

/**
 * Controlla se l'utente è inserito in una classe
 * 
 * @param medoo $database Connessione con il database
 * @param int $user Identificativo dell'utente da considerare
 * @return boolean
 */
function classe($database, $user)
{
    return $database->count("studenti", array("AND" => array("id" => $database->max("studenti", "id"), "persona" => $user))) != 0;
}
开发者ID:Dasc3er,项目名称:Sito-studentesco,代码行数:11,代码来源:default.php


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