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


PHP mysqlConnection::fetch方法代码示例

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


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

示例1: confCopy_options

function confCopy_options()
{
    global $array;
    $options = NULL;
    $mysql = new mysqlConnection();
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id!='{$array['board_id']}'\n\t\t\tORDER BY name ASC\n\t\t");
    if ($mysql->numRows() > 0) {
        $options = "<option value=\"NONE\">게시판 선택</option>";
        do {
            $options .= "<option value=\"" . $mysql->fetch("board_id") . "\">" . $mysql->fetch("name") . " (" . $mysql->fetch("board_id") . ")</option>";
        } while ($mysql->nextRec());
        return $options;
    } else {
        return $options .= "<option value=\"NONE\">복사 대상 없음</option>";
    }
}
开发者ID:devwit,项目名称:toonytool,代码行数:16,代码来源:boardList.php

示例2:

$method->method_param("POST", "save_id,redirect,id,password");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/*
검사
*/
if ($member['me_level'] < 10) {
    $validator->validt_diserror("", "이미 로그인 되어 있습니다.");
}
$validator->validt_email("id", 1, "");
$validator->validt_password("password", 1, "");
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_password=password('{$password}') AND me_drop_regdate IS NULL\n\t");
if ($mysql->numRows() < 1) {
    $validator->validt_diserror("id", "아이디 혹은 비밀번호가 잘못 되었습니다.");
}
if ($mysql->fetch("me_idCheck") == "N") {
    $validator->validt_returnAjax("이메일 인증이 필요한 아이디입니다.", "account.idCheck.send.php");
}
/*
로그인 처리
*/
$member['me_id'] = $mysql->fetch("me_id");
$member['me_idno'] = $mysql->fetch("me_idno");
$session->session_register("__toony_member_idno", $member['me_idno']);
/*
로그인 내역 기록
*/
$mysql->query("\n\t\tUPDATE toony_member_list\n\t\tSET me_login_ip='{$_SERVER['REMOTE_ADDR']}',me_login_regdate=now()\n\t\tWHERE me_idno='{$member['me_idno']}';\n\t");
/*
아이디 저장을 체크한 경우 아이디를 쿠키에 저장
*/
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:login.submit.php

示例3:

/*
이미 존재하는 아이디인지 검사
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_drop_regdate IS NULL\n\t");
if ($mysql->numRows() > 0) {
    $validator->validt_diserror("id", "이미 존재하는 아이디입니다.");
}
/*
DB 기록
*/
$mysql->query("\n\t\tINSERT INTO toony_member_list\n\t\t(me_id,me_password,me_nick,me_sex,me_phone,me_telephone,me_regdate)\n\t\tVALUES\n\t\t('{$id}',{$password_val},'{$nick}','{$sex}','{$phone}','{$telephone}',now())\n\t");
/*
회원 코드를 가져옴
*/
$mysql->select("\n\t\tSELECT me_idno\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_password=password('{$password}') AND me_drop_regdate IS NULL\n\t");
$member['me_idno'] = $mysql->fetch("me_idno");
/*
가입 이력이 없는 새로운 가입인 경우 아이디 인증 메일 발송
*/
//인증 메일 발송
$idCheckCode = md5(date("YmdHis") . $id);
$idCheckUrl = __URL_PATH__ . "?article=account&p=account.idCheck&code=" . $idCheckCode . "&keepViewType=true";
$mailSender->template = "account";
$mailSender->t_email = $id;
$mailSender->t_name = $nick;
$mailSender->subject = "{$nick}님, {$site_config['ad_site_name']} 이메일 인증을 해주세요.";
$mailSender->account_check_url = "<a href=\"{$idCheckUrl}\" target=\"_blank\">" . $idCheckUrl . "</a>";
$mailSender->mail_send();
//인증 메일 발송 이력 DB 기록
$mysql->query("\n\t\tINSERT INTO toony_member_idCheck\n\t\t(me_idno,ric_code,ric_regdate)\n\t\tVALUES\n\t\t('{$member['me_idno']}','{$idCheckCode}',now())\n\t");
/*
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:account.submit.php

示例4: skinController

<?php

$tpl = new skinController();
$mysql = new mysqlConnection();
/*
기본 정보 로드
*/
$mysql->select("\n\t\tSELECT source\n\t\tFROM toony_admin_mailling_template\n\t\tWHERE type='mailling'\n\t");
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$sourceCode = $mysql->fetch("source");
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/mailTplMailling.html");
/*
템플릿 치환
*/
$tpl->skin_modeling("[sourceCode]", $sourceCode);
echo $tpl->skin_echo();
开发者ID:devwit,项目名称:toonytool,代码行数:20,代码来源:mailTplMailling.php

示例5: explode

/*
변수 처리
*/
if (!$type) {
    $type = "new";
}
/*
수정 모드인 경우 기본 정보 로드
*/
if ($type == "modify") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id='{$act}'\n\t\t");
    $mysql->fetchArray("write_point,read_point,skin,board_id,name,list_limit,length_limit,use_secret,use_comment,use_likes,use_category,category,use_reply,use_vote,use_file1,use_file2,use_list,file_limit,void_html,controll_level,write_level,read_level,secret_level,comment_level,array_level,reply_level,delete_level,top_file,bottom_file,thumb_width,thumb_height,articleIMG_width,articleIMG_height,article_length,ico_file,ico_mobile,ico_secret,ico_secret_def,ico_new,ico_new_def,ico_hot,ico_hot_def,tc_1,tc_2,tc_3,tc_4,tc_5");
    $array = $mysql->array;
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $array['top_source'] = $mysql->fetch("top_source");
    $array['bottom_source'] = $mysql->fetch("bottom_source");
}
/*
홈페이지&모바일페이지 설정 값이 함께 기록되는 필드인 경우 분리
*/
$use_list_exp = explode("|", $array['use_list']);
$array['use_list'] = $use_list_exp[0];
$array['use_m_list'] = $use_list_exp[1];
$list_limit_exp = explode("|", $array['list_limit']);
$array['list_limit'] = $list_limit_exp[0];
$array['list_m_limit'] = $list_limit_exp[1];
$length_limit_exp = explode("|", $array['length_limit']);
$array['length_limit'] = $length_limit_exp[0];
$array['length_m_limit'] = $length_limit_exp[1];
$article_length_exp = explode("|", $array['article_length']);
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:boardList_modify.php

示例6: OR

서브페이지 네비게이션 선언
*/
if (CALLED_DEPTH == 1) {
    $where = "callName='" . CALLED_ARTICLE . "'";
} else {
    if (CALLED_DEPTH == 2) {
        $where = "(callName='" . CALLED_ARTICLE . "') OR (class='" . CALLED_CLASS . "' AND depth=1)";
    } else {
        if (CALLED_DEPTH == 3) {
            $where = "(callName='" . CALLED_ARTICLE . "') OR (class='" . CALLED_CLASS . "' AND depth=1) OR (idno='" . CALLED_PARENT . "' AND depth=2)";
        }
    }
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_menuInfo\n\t\tWHERE vtype='" . CALLED_VIEWTYPE . "' AND drop_regdate IS NULL AND ({$where})\n\t\tORDER BY depth ASC\n\t");
$naviTxt = "<a href=\"{$site_config['ad_site_url']}" . CALLED_VIEWDIR . "\">{$site_config['ad_site_name']}</a>";
//depth가 1인 경우 1차 메뉴 출력
if (CALLED_DEPTH == 1) {
    $naviTxt .= " > <a href=\"?article=" . $mysql->fetch("callName") . "\">" . $mysql->fetch("name") . "</a>";
    //depth가 2 이상인 경우 2차 메뉴 출력
} else {
    do {
        $naviTxt .= " > <a href=\"?article=" . $mysql->fetch("callName") . "\">" . $mysql->fetch("name") . "</a>";
    } while ($mysql->nextRec());
}
/*
템플릿 치환
*/
$tpl->skin_modeling("[/layoutskinDir/]", __URL_PATH__ . "layoutskin/" . CALLED_LAYOUTDIR);
$tpl->skin_modeling("[subpage_title]", $mysql->fetch("name"));
$tpl->skin_modeling("[navigator]", $naviTxt);
echo $tpl->skin_echo();
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:sub.php

示例7: skinController

<?php

include_once "../include/pageJustice.inc.php";
$tpl = new skinController();
$method = new methodController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method->method_param("GET", "redirect");
/*
검사
*/
if ($member['me_level'] < 10) {
    $lib->error_alert_location("이미 로그인 되어 있습니다.", $site_config['ad_site_url'], "A");
}
/*
최고 운영자 이메일 로드
*/
$mysql->select("\n\t\tSELECT me_id\n\t\tFROM toony_member_list\n\t\tWHERE me_admin='Y' AND me_drop_regdate IS NULL\n\t\tLIMIT 1\n\t");
$admin_email = $mysql->fetch("me_id");
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/login.html");
/*
템플릿 치환
*/
$tpl->skin_modeling("[admin_email]", $admin_email);
$tpl->skin_modeling("[redirectUri]", urlencode($redirect));
echo $tpl->skin_echo();
开发者ID:devwit,项目名称:toonytool,代码行数:29,代码来源:login.php

示例8: MAX

    //검사
    if ($type == 1) {
        $me_idno = "";
        $validator->validt_nick("writer", 1, "");
    } else {
        if ($type == 2) {
            $me_idno = $member['me_idno'];
            $writer = $member['me_nick'];
        } else {
            $validator->validt_diserror("", "오류. 댓글 등록 불가");
        }
    }
    $validator->validt_strLen("comment", 5, "", 1, "댓글은 5자 이상 입력해야 합니다.");
    //ln값 처리
    $mysql->select("\n\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\tWHERE bo_idno='{$read}'\n\t\t");
    $ln_array['ln_max'] = $mysql->fetch("ln_max");
    if (!$ln_array['ln_max']) {
        $ln_array['ln_max'] = 1000;
    }
    $ln_array['ln_max'] = ceil($ln_array['ln_max'] / 1000) * 1000;
    //DB 기록
    $mysql->query("\n\t\t\tINSERT INTO toony_module_board_comment_{$board_id}\n\t\t\t(ln,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5) \n\t\t\tVALUES\n\t\t\t('{$ln_array['ln_max']}','{$read}','{$me_idno}','{$writer}','{$comment}','{$_SERVER['REMOTE_ADDR']}',now(),'{$tr_1}','{$tr_2}','{$tr_3}','{$tr_4}','{$tr_5}')\n\t\t");
    //완료후 리턴
    $validator->validt_success_function("read_comment_include()");
}
/*
대댓글 등록
*/
if ($mode == 11) {
    //검사
    if ($type == 1) {
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:read.comment.submit.php

示例9:

{
    global $array;
    if ($array['depth'] < 2) {
        return $array['idno'];
    } else {
        return $array['class'];
    }
}
/*
템플릿 치환
*/
//Header
$header->skin_modeling("[tab_active_p]", tab_active("p"));
$header->skin_modeling("[tab_active_m]", tab_active("m"));
$header->skin_modeling("[vtype_value]", $vtype);
$header->skin_modeling("[mainPage_name]", $mysql->fetch("main_name"));
$header->skin_modeling("[idno]", $mysql->fetch("main_idno"));
echo $header->skin_echo();
//Loop
$i = 0;
do {
    if ($mysql->numRows() > 0) {
        $mysql->htmlspecialchars = 1;
        $mysql->nl2br = 1;
        $mysql->fetchArray("name,class,zindex,idno,depth,useMenu");
        $array = $mysql->array;
        $loop->skin_modeling("[name]", name_func());
        $loop->skin_modeling("[zindex]", $array['zindex']);
        $loop->skin_modeling("[depth]", $array['depth']);
        $loop->skin_modeling("[class]", $array['class']);
        $loop->skin_modeling("[parent]", $array['idno']);
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:menuSetting.php

示例10:

/*
변수 처리
*/
if (!$vtype || $vtype != "p" && $vtype != "m") {
    $vtype = "p";
}
/*
수정 모드인 경우 기본 정보 로드
*/
if ($type == "modify") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_page_list\n\t\t\tWHERE idno='{$act}'\n\t\t");
    $mysql->fetchArray("name,memo,idno,level,vtype");
    $array = $mysql->array;
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $array['source'] = $mysql->fetch("source");
    $array['scriptCode'] = $mysql->fetch("scriptCode");
} else {
    $array = NULL;
}
/*
검사
*/
if ($type == "modify" && $mysql->numRows() < 1) {
    $lib->error_alert_location("페이지가 존재하지 않습니다.", $site_config['ad_site_url'], "A");
}
if (!$type) {
    $lib->error_alert_location("호출 값이 없습니다.", $site_config['ad_site_url'], "A");
}
/*
템플릿 로드
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:pageList_modify.php

示例11: board_selecbox_options

$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "vtype");
/*
기본 정보 로드
*/
if ($vtype == "m") {
    $table_field = "ad_msite_main";
} else {
    $table_field = "ad_site_main";
}
$mysql->select("\n\t\tSELECT {$table_field} as site_html\n\t\tFROM toony_admin_siteconfig\n\t\tWHERE 1\n\t\tORDER BY 1 DESC\n\t");
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$site_html = $mysql->fetch("site_html");
/*
템플릿 로드
*/
if ($vtype == "m") {
    $load_page = "admin/_tpl/mainPage.m.html";
} else {
    $load_page = "admin/_tpl/mainPage.html";
}
$tpl->skin_file_path($load_page);
/*
템플릿 함수
*/
function board_selecbox_options()
{
    global $mysql, $vtype;
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:mainPage.php

示例12: explode

    $globalMysql->fetchArray("me_idno,me_id,me_password,me_nick,me_name,me_level,me_sex,me_phone,me_telephone,me_regdate,me_login_regdate,me_login_ip,me_point,me_admin");
    $member = $globalMysql->array;
} else {
    $member['me_level'] = 10;
    $member['me_idno'] = NULL;
    $member['me_id'] = NULL;
    $member['me_nick'] = NULL;
    $member['me_phone'] = NULL;
    $member['me_admin'] = NULL;
}
/*
회원 레벨별 명칭을 불러옴
*/
$globalMysql->select("\n\t\tSELECT ad_member_type\n\t\tFROM toony_admin_siteconfig\n\t\tLIMIT 1\n\t");
for ($MT_vars_i = 0; $MT_vars_i <= 8; $MT_vars_i++) {
    $vars = explode(",", htmlspecialchars(stripslashes($globalMysql->fetch("ad_member_type"))));
}
for ($MT_vars_i = 1; $MT_vars_i <= 9; $MT_vars_i++) {
    $member_type_var[$MT_vars_i] = $vars[$MT_vars_i - 1];
}
$member_type_var['10'] = "비회원";
/*
사이트 기본 정보 설정 불러옴
*/
$globalMysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_siteconfig\n\t");
$globalMysql->fetchArray("ad_site_layout,ad_msite_layout,ad_site_name,ad_site_url,ad_msite_url,ad_use_msite,ad_site_title,ad_email,ad_phone,ad_pavicon,ad_logo,ad_use_smtp,ad_smtp_server,ad_smtp_port,ad_smtp_id,ad_smtp_pwd");
$site_config = $globalMysql->array;
/*
방문자 분석을 위한 함수 시작
*/
$lib->func_visiter_counter_status();
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:global.php

示例13:

/*
삭제처리
*/
if ($delete_true == 1) {
    //최소/최대 ln값 구함
    $ln_min = (int) (ceil($array['ln'] / 1000) * 1000) - 1000;
    $ln_max = (int) (ceil($array['ln'] / 1000) * 1000);
    //부모글인 경우 삭제 조건문 만듬
    if ($array['rn'] == 0) {
        $delete_where = "ln>{$ln_min} AND ln<={$ln_max}";
        //자식글(답글)인 경우 삭제 조건문 만듬
    } else {
        if ($array['rn'] >= 1) {
            //같은 레벨중 바로 아래 답글의 ln값을 불러옴
            $mysql->select("\n\t\t\t\tSELECT ln \n\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\tWHERE ln>={$ln_min} AND ln<{$array['ln']} AND rn={$array['rn']}\n\t\t\t\tORDER BY ln DESC\n\t\t\t\tLIMIT 1\n\t\t\t");
            $earray[ln] = $mysql->fetch("ln");
            if ($earray[ln] == "") {
                $delete_where = "ln<={$array['ln']} AND ln>{$ln_min} AND rn>={$array['rn']}";
            } else {
                $delete_where = "ln<={$array['ln']} AND ln>{$earray['ln']} AND rn>={$array['rn']}";
            }
        }
    }
    //첨부파일 삭제
    $fileUploader->savePath = __DIR_PATH__ . "modules/board/upload/" . $board_id . "/";
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_data_{$board_id} \n\t\t\tWHERE {$delete_where}\n\t\t");
    do {
        $mysql->fetchArray("file1,file2");
        $farray = $mysql->array;
        if ($farray['file1'] != "") {
            $fileUploader->fileDelete($farray['file1']);
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:delete.php

示例14: MAX

     $mysql->select("\n\t\t\t\tSELECT *\n\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\tWHERE idno='{$cnum_ex[$i]}'\n\t\t\t");
     $ln[$i] = $mysql->fetch("ln");
     $rn[$i] = $mysql->fetch("rn");
 }
 for ($i = 0; $i < sizeof($cnum_ex); $i++) {
     //rn이 0인 부모글인 경우만 이동 실행
     if ($rn[$i] == 0) {
         //글의 최소/최대 ln값 구함
         $ln_min = (int) (ceil($ln[$i] / 1000) * 1000) - 1000;
         $ln_max = (int) (ceil($ln[$i] / 1000) * 1000);
         //글의 자식들의 범위를 구함
         $where = "ln>{$ln_min} AND ln<={$ln_max}";
         $mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_module_board_data_{$board_id} \n\t\t\t\t\tWHERE {$where}\n\t\t\t\t");
         //대상 게시판의 최대 ln값 불러옴
         $tar_mysql->select("\n\t\t\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\t\t\tFROM toony_module_board_data_{$tar_board_id}\n\t\t\t\t\tWHERE 1\n\t\t\t\t\tORDER BY ln DESC\n\t\t\t\t\tLIMIT 1\n\t\t\t\t");
         $tar_ln = $tar_mysql->fetch("ln_max");
         if (!$tar_ln) {
             $tar_ln = 1000;
         }
         $tar_ln = ceil($tar_ln / 1000) * 1000;
         do {
             $mysql->htmlspecialchars = 0;
             $mysql->nl2br = 0;
             $mysql->fetchArray("idno,category,ln,rn,me_idno,writer,password,email,ment,subject,file1,file1_cnt,file2,file2_cnt,link1,link2,use_secret,use_notice,use_html,use_email,view,ip,regdate,td_1,td_2,td_3,td_4,td_5");
             $array = $mysql->array;
             //가져온 원본들의 내용을 addslashes 시킴
             foreach ($array as $key => $value) {
                 $array[$key] = addslashes($array[$key]);
             }
             //대상 게시판으로 첨부파일을 복사
             $oldPath = __DIR_PATH__ . "modules/board/upload/" . $board_id . "/";
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:controll.submit.php

示例15:

$notAccount_tpl->skin_loop_array("[{idCheck_notAccount_start}]", "[{idCheck_notAccount_end}]");
//폐기된 인증코드인 경우
$notFound_tpl->skin_html_load($tpl->skin);
$notFound_tpl->skin_loop_array("[{idCheck_notFound_start}]", "[{idCheck_notFound_end}]");
//이미 인증된 인증코드인 경우
$destroy_tpl->skin_html_load($tpl->skin);
$destroy_tpl->skin_loop_array("[{idCheck_destroy_start}]", "[{idCheck_destroy_end}]");
/*
검사
*/
$successVar = true;
if (trim($code) == "") {
    $lib->error_alert_location("정상적으로 접근하세요.", $site_config[ad_site_url], "A");
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_idCheck \n\t\tWHERE ric_code='{$code}'\n\t");
$ric_me_idno = $mysql->fetch("me_idno");
if ($mysql->numRows() < 1) {
    echo $notAccount_tpl->skin_echo();
    $successVar = false;
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_idCheck\n\t\tWHERE me_idno='{$ric_me_idno}'\n\t\tORDER BY ric_regdate DESC\n\t\tLIMIT 1\n\t");
if ($successVar == true && $mysql->fetch("ric_code") != $code) {
    echo $notFound_tpl->skin_echo();
    $successVar = false;
}
if ($successVar == true && $mysql->fetch("ric_check") == "Y") {
    echo $destroy_tpl->skin_echo();
    $successVar = false;
}
/*
회원 DB에서 아이디 체크 완료 내역을 기록
开发者ID:devwit,项目名称:toonytool,代码行数:31,代码来源:account.idCheck.php


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