flagflag  If you want to see English page, please click "English" Button at Left.
1: 2021-07-29 (木) 13:35:08 iseki ソース
Line 1: Line 1:
 +*** DataBase [#v4abf387]
 +- lib/dmllib.php
 +#br
 +**** count_records [#rc2a2d4a]
 + $count = count_records('autoattend_sessions', 'courseid', $course->id, 'sessdate', $sdate, 'starttime', $starttime);
 +
 +**** get_record(s) [#z3e3f469]
 +- get_record($table, $field1, $value1, $field2="", $value2="", $field3="", $value3="", $fields='*')
 + if ($user = get_record('user', 'id', $USER->id)) {
 +   $firstname = $user->firstname;
 + }
 +- get_records($table, $field="", $value="", $sort="", $fields='*', $limitfrom="", $limitnum="")
 + if (!$vars = get_records('autoattend_settings', 'courseid', $courseid, 'id')) {
 +   $vars = get_records('autoattend_settings', 'courseid', 0);      // use default
 + }
 +
 +**** get_records_sql [#r096c770]
 + $qey = "SELECT * FROM .......";
 + if ($users = get_records_sql($qry)) {
 +   foreach($users as $key => $user) {
 +       $return['id']      = $user->id;
 +       $return['attsid'] = $user->attsid;
 +       .............................
 +   }
 + }
 +
 +**** update_record, insert_record [#bfdf5685]
 + $update = false;
 + if ($rec = get_record('autoattend_settings', 'courseid', $course->id, 'status', $status[$i])) {
 +   $update = true;
 + }
 + $rec->courseid = $course->id;
 + ............................
 + if ($update) {
 +     $result = update_record('autoattend_settings', $rec);
 + }
 + else {
 +     $result = insert_record('autoattend_settings', $rec);
 + }
 + unset($rec);
 +
 +**** delete_records [#u570f164]
 + delete_records('autoattend_settings​', 'courseid', $course->id);
 +
 +**** XMLDB [#yaa09041]
 +- http://dev.moodle.org/mod/resource/view.​php?id=48
 +- block にディレクトリを作成し,その中に dbディレクトリを作る.
 +- 「サイト管理」→「その他」→「XMLDBエディタ」 でデータベース定義用の db/install.xml を作成する.
 +#br


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

54 人のユーザが現在オンラインです。 (16 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 54

もっと...

アクセスカウンタ

今日 : 505505505
昨日 : 8048804880488048
総計 : 2367006623670066236700662367006623670066236700662367006623670066
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com