9: 2013-04-19 (金) 23:35:31 iseki |
10: 2013-04-22 (月) 15:24:46 iseki |
| - array(object) get_records_select($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) | | - array(object) get_records_select($table, $select, array $params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0) |
| - $select の ''?'' に 配列 $params の要素が対応(並び順) | | - $select の ''?'' に 配列 $params の要素が対応(並び順) |
| + | - $select 中の '':変数名'' に $params の各要素が対応 |
| - name が結果の配列のキーになる(重複があるとワーニング) | | - name が結果の配列のキーになる(重複があるとワーニング) |
| $templates = $DB->get_records_select('apply_template', 'course=? OR ispublic=1', array($course->id), 'name'); | | $templates = $DB->get_records_select('apply_template', 'course=? OR ispublic=1', array($course->id), 'name'); |
| **** $DB->get_records_sql [#kb220662] | | **** $DB->get_records_sql [#kb220662] |
| - array(object) get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) | | - array(object) get_records_sql($sql, array $params=null, $limitfrom=0, $limitnum=0) |
| + | - $sql の ''?'' に 配列 $params の要素が対応(並び順) |
| - $sql 中の '':変数名'' に $params の各要素が対応 | | - $sql 中の '':変数名'' に $params の各要素が対応 |
| $where = 'WHERE as.id=av.submit_id AND av.version=0 AND as.apply_id=:apply_id AND ai.id=av.item_id '; | | $where = 'WHERE as.id=av.submit_id AND av.version=0 AND as.apply_id=:apply_id AND ai.id=av.item_id '; |