Dolemメモ
<?php print_r($PostClass->get('ply.skill.skill_name'));?>
連想配列の中身の取り出し方はドット区切り
モデルでのレイアウトの変更
if( $GetClass->get('mode') == 'edit' ){ //エディットモードなら
$unit_id = $GetClass->get('unit_id');
if($conn) { //コネクトできたら unitを取得
$table = 'unit';
$column = array(
'*',
);
$condition = 'WHERE id >= '.sql_eN($unit_id);
$units =db_select($table, $column, $condition);
$this->set('unit', $units);
}else {
die('db error ');
}//コネクトできたら
}
function disp() {
$GetClass = GetClass::newInstance();
if( $GetClass->get('mode') == 'add' ){
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/add.php';
}else if( $GetClass->get('mode') == 'list' ){
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/list.php';
}else if( $GetClass->get('mode') == 'edit' ){
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/edit.php';
}else if( $GetClass->get('mode') == 'result' ){
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/result.php';
}else if( $GetClass->get('mode') == 'map' ){
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/map.php';
}else{
$layout = VIEW_DIR_PATH. '/'.general('c').'/layout/index.php';
}
include($layout);
return true;
}// end function
$chk = true;
if($chk) $chk = db_query('BEGIN');
if($chk){
$sTableName = 'blog_data';
$aryColumn = array(
'history_date' => CSqlS($PostClass->get('history_date_y').'-'.$PostClass->get('history_date_m').'-'.$PostClass->get('history_date_d').' '.$PostClass->get('history_date_h').':'.$PostClass->get('history_date_i')),
'title' => CSqlS($PostClass->get('title')),
'body' => CSqlS($PostClass->get('body')),
'category_id' => CSqlN($PostClass->get('category_id')),
'up_date' => CSqlS(my_date('Y/m/d H:i:s')),
);
$sCondition = ' WHERE id ='.CSqlN($GetClass->get('hid'));
$chk = db_update($sTableName, $aryColumn, $sCondition);
}// end if
if($chk) $chk = db_query('COMMIT');
echo $chk;
http://yarupon.blog134.fc2.com/blog-entry-5727.html