本文整理汇总了PHP中mysqlConnection::select方法的典型用法代码示例。如果您正苦于以下问题:PHP mysqlConnection::select方法的具体用法?PHP mysqlConnection::select怎么用?PHP mysqlConnection::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysqlConnection
的用法示例。
在下文中一共展示了mysqlConnection::select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select
public function select($req, $params = null)
{
if (!$this->autoCommit && !$this->inTransaction) {
$this->begin();
}
if ($params !== null) {
$req = $this->emuPrepStmt($req, $params);
}
return parent::select($req);
}
示例2: 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>";
}
}
示例3:
}
/*
정렬 기준 설정
*/
if (!$order) {
$order = "me_drop_regdate";
}
if (!$orderby) {
$orderby = "DESC";
}
$array_order = $order . " " . $orderby;
/*
페이징 설정
*/
$paging_query = "\n\t\tSELECT * \n\t\tFROM toony_member_list\n\t\tWHERE {$array_where}\n\t\tORDER BY {$array_order}\n\t";
$mysql->select($paging_query);
$paging_query_no = $mysql->numRows();
$paging->page_param($page);
$total_num = $paging->setTotal($paging_query_no);
$paging->setListPerPage(10);
$sql = $paging->getPaggingQuery($paging_query);
$mysql->select($sql);
$array_total = $mysql->numRows();
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/leaveMember.html");
$header->skin_html_load($tpl->skin);
$header->skin_loop_header("[{loop_start}]");
$loop->skin_html_load($tpl->skin);
$loop->skin_loop_array("[{loop_start}]", "[{loop_end}]");
示例4: total_count
function total_count()
{
$query = new mysqlConnection();
$query->select("select count(*) total_count from toony_admin_counter");
return number_format($query->fetch("total_count"));
}
示例5: 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();
示例6: skinController
include_once __DIR_PATH__ . "modules/board/install/installCheck.php";
$tpl = new skinController();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "act,type");
/*
변수 처리
*/
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];
示例7: explode
$__toony_board_view = $session->session_selector('__toony_board_view_' . $board_id . '_' . $read);
//조회수 세션
/*
패스워드가 submit된 경우
*/
if ($s_password != "") {
$method->method_param("POST", "s_board_id,s_mode,s_read,s_password,s_page,where,keyword");
$board_id = $s_board_id;
$read = $s_read;
$mode = $s_mode;
$page = $s_page;
}
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("write_point,read_point,skin,name,use_category,use_comment,use_list,use_likes,use_reply,use_file1,use_file2,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,top_file,bottom_file,articleIMG_width,articleIMG_height,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$mysql->fetchArray("top_source,bottom_source");
$c_array = $mysql->array;
/*
설정 필드가 홈페이지+모바일페이지의 설정 값을 같이 사용하는 경우 분리
*/
if ($viewType == "p") {
$ex_slt = 0;
} else {
$ex_slt = 1;
}
$use_list_ex = explode("|", $c_array['use_list']);
示例8:
if ($useMenu_side_val == "disabled" || $useMenu_side == "checked") {
$useMenu_side = "Y";
} else {
$useMenu_side = "N";
}
if ($useMenu_header_val == "disabled" || $useMenu == "checked") {
$useMenu = "Y";
} else {
$useMenu = "N";
}
/*
검사
*/
//수정 모든인 경우 검사
if ($type == "modify") {
$mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_admin_menuInfo\n\t\t\tWHERE idno='{$org}'\n\t\t");
$lockMenu = $mysql->fetch("lockMenu");
$thisDepth = $mysql->fetch("depth");
$thisClass = $mysql->fetch("class");
$validator->validt_null("name", "");
if ($href == "pm" && trim($link) == "" && $lockMenu != "Y") {
$validator->validt_diserror("link", "연결할 페이지 또는 모듈을 선택해 주세요.");
}
if ($href == "mp" && trim($linkDoc) == "" && $lockMenu != "Y") {
$validator->validt_diserror("linkDoc", "");
}
if ($href == "fm" && trim($forward) == "" && $lockMenu != "Y") {
$validator->validt_diserror("forward", "포워딩 메뉴를 선택해 주세요.");
}
//1차 메뉴의 header 노출 옵션이 꺼져 있으면, 2차 메뉴는 옵션 활성화 불가
if ($thisDepth == 2 && $useMenu == "Y") {
示例9: 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]);
}
//대상 게시판으로 첨부파일을 복사
示例10: skinController
<?php
$tpl = new skinController();
$header = new skinController();
$loop = new skinController();
$footer = new skinController();
$mysql = new mysqlConnection();
$lib = new libraryClass();
$paging = new pagingClass();
$method = new methodController();
$method->method_param("GET", "page,where,keyword,order,orderby");
/*
기본 정보 로드
*/
$mysql->select("\n\t\tSELECT\n\t\tCOUNT(*) total_member,\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_member_list\n\t\t\tWHERE me_idCheck='Y' AND me_admin!='Y' AND me_drop_regdate IS NULL\n\t\t) total_idCheckMember,\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_member_list\n\t\t\tWHERE me_idCheck='N' AND me_admin!='Y' AND me_drop_regdate IS NULL\n\t\t) total_noIdCheckMember\n\t\tFROM toony_member_list\n\t\tWHERE me_admin!='Y' AND me_drop_regdate IS NULL\n\t");
$mysql->fetchArray("total_member,total_idCheckMember,total_noIdCheckMember");
$total_info = $mysql->array;
/*
검색 키워드 설정
*/
if (trim($keyword) != "") {
$array_where = $where . " LIKE '%" . $keyword . "%' AND me_admin!='Y' AND me_drop_regdate IS NULL";
} else {
$array_where = "me_admin!='Y' AND me_drop_regdate IS NULL";
}
/*
정렬 기준 설정
*/
if (!$order) {
$order = "me_regdate";
}
示例11: call_admin_mainPage
function call_admin_mainPage($vtype)
{
global $viewType, $site_config, $member, $viewDir, $member_type_var, $article, $m, $p;
//type 변수 내용에 따른 DB 필드명 선언
if ($vtype == "p") {
$field = "ad_site_jsmain";
} else {
$field = "ad_msite_jsmain";
}
//DB에서 메인화면 디자인을 불러옴
$mysql = new mysqlConnection();
$mysql->select("\n\t\t\tSELECT {$field}\n\t\t\tFROM toony_admin_siteconfig\n\t\t");
$items = $mysql->fetch($field);
//DB에서 불러온 아이템 문자열을 나누어 각각의 아이템으로 분리
$item = explode("#", $items);
$item_count = count($item);
//아이템이 어떤 형태인지 구분
for ($i = 1; $i < $item_count; $i++) {
$nameLen = substr($item[$i], 0, 7);
if (stristr($nameLen, "latest")) {
$itemType[$i] = "latest";
} else {
if (stristr($nameLen, "banner")) {
$itemType[$i] = "banner";
} else {
if (stristr($nameLen, "href")) {
$itemType[$i] = "href";
}
}
}
}
//아이템을 HTML로 변환하여 출력함 (홈페이지)
if ($vtype == "p") {
for ($i = 1; $i < $item_count; $i++) {
$data = explode("|", $item[$i]);
$pixel_x = 92;
$pixel_y = 40;
switch ($itemType[$i]) {
case "latest":
//박스 크기, 위치 계산
$box_left = ($pixel_x + 10) * ($data[12] - 1);
$box_top = $pixel_y * $data[13] - $pixel_y;
$box_width = $pixel_x * $data[14] + (($data[14] - 1) * 10 - 10);
$box_height = $pixel_y * $data[15] - 20;
//게시판 모듈 최근게시물 출력
echo "\n\t\t\t\t\t\t\t<div class=\"latest_" . $data[4] . " " . $data[2] . "\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t" . call_board_latest($vtype, $data[3], $data[1], $data[5], $data[6], $data[7], $data[4], $data[8], $data[9], $data[10], $data[11]) . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t";
break;
case "banner":
//박스 크기, 위치 계산
$box_left = ($pixel_x + 10) * ($data[6] - 1);
$box_top = $pixel_y * $data[7] - $pixel_y;
$box_width = $pixel_x * $data[8] + (($data[8] - 1) * 10 - 10);
$box_height = $pixel_y * $data[9];
//배너공간 출력
if (!call_admin_mainPage_item(__DIR_PATH__ . "upload/siteInformations/" . $data[2])) {
echo "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px;\">\n\t\t\t\t\t\t\t\t\t설정한 배너 이미지 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
} else {
echo "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t\t\t\t<a href=\"{$data[3]}\" target=\"_{$data[4]}\" title=\"{$data[5]}\"><img src=\"" . __URL_PATH__ . "upload/siteInformations/" . $data[2] . "\" width=\"{$box_width}\" height=\"{$box_height}\" /></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
}
break;
case "href":
//박스 크기, 위치 계산
$box_left = ($pixel_x + 10) * ($data[3] - 1);
$box_top = $pixel_y * $data[4] - $pixel_y;
$box_width = $pixel_x * $data[5] + (($data[5] - 1) * 10 - 10);
$box_height = $pixel_y * $data[6];
//외부 문서 출력
if (!call_admin_mainPage_item(__DIR_PATH__ . $data[2] . ".php")) {
echo "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px;\">\n\t\t\t\t\t\t\t\t\t설정한 외부 문서 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
} else {
ob_start();
include __DIR_PATH__ . $data[2] . ".php";
$include_html = ob_get_contents();
ob_end_clean();
echo "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t\t" . $include_html . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
}
break;
}
//화면의 총 height를 구함
$box_total_height = $box_top + $box_height;
if ($i == 1) {
$total_height = $box_total_height;
}
if ($box_total_height > $total_height) {
$total_height = $box_total_height;
}
}
//아이템을 HTML로 변환하여 출력함 (모바일페이지)
} else {
$sort = array();
$sort_html = array();
for ($i = 1; $i < $item_count; $i++) {
$data = explode("|", $item[$i]);
switch ($itemType[$i]) {
case "latest":
if ($data[4] == "list") {
$data[4] = "default";
}
//게시판 모듈 최근게시물 출력
$sort[$i] = $data[13];
//.........这里部分代码省略.........
示例12: libraryClass
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "act");
/*
DB 조건 변수 처리
*/
if ($act) {
$where = "idno={$act}";
} else {
$where = "1";
}
/*
메일링 정보 로드
*/
$mysql->select("\n\t\tSELECT A.*,B.*\n\t\tFROM toony_admin_mailling A\n\t\tLEFT OUTER JOIN toony_member_list B\n\t\tON A.me_idno=B.me_idno\n\t\tWHERE {$where}\n\t\tORDER BY regdate DESC\n\t\tLIMIT 1\n\t");
$mysql->fetchArray("idno,min_level,max_level,subject,regdate,me_idno,me_nick");
$array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$array['memo'] = $mysql->fetch("memo");
/*
검사
*/
if ($mysql->numRows() < 1) {
$lib->error_alert_location("존재하지 않는 메일링 입니다.", $site_config['ad_site_url'], "A");
}
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/maillingList_view.html");
示例13: mysqlConnection
$mysql = new mysqlConnection();
$method = new methodController();
$validator = new validator();
$method->method_param("POST", "type,cnum,id,memo,ip");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/**************************************************
추가 모드인 경우
**************************************************/
if ($type == "new") {
/*
검사
*/
$validator->validt_null("ip", "");
$validator->validt_null("memo", "");
$mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_admin_security_ip\n\t\t\tWHERE ip='{$ip}'\n\t\t");
if ($mysql->numRows() > 0) {
$validator->validt_diserror("ip", "이미 등록된 ip입니다.");
}
/*
DB 저장
*/
$mysql->query("\n\t\t\tINSERT INTO toony_admin_security_ip (ip,memo,regdate)\n\t\t\tVALUES\n\t\t\t('{$ip}','{$memo}',now())\n\t\t");
/*
완료 후 리턴
*/
$validator->validt_success("성공적으로 추가 되었습니다.", "admin/?p=blockIP");
/**************************************************
삭제 모드인 경우
**************************************************/
} else {
示例14: libraryClass
<?php
include "../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$mailSender = new mailSender();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "min_level,max_level");
/*
검사
*/
if ($min_level == "none") {
echo '<!--error::null_min_level-->';
exit;
}
if ($max_level == "none") {
echo '<!--error::null_max_level-->';
exit;
}
/*
발송 대상 인원수 구함
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE (me_level<={$min_level} AND me_level>={$max_level}) AND me_drop_regdate IS NULL\n\t\tORDER BY me_regdate DESC\n\t");
/*
완료 후 리턴
*/
echo $mysql->numRows();
示例15: methodController
include __DIR_PATH__ . "capcha/zmSpamFree.php";
$method = new methodController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
$session = new sessionController();
$mailSender = new mailSender();
$fileUploader = new fileUploader();
$validator = new validator();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "article,category,category_ed,board_id,writer,subject,use_secret,use_notice,use_html,use_email,ment,password,email,file1_ed,file2_ed,file1_del,file2_del,read,mode,type,page,where,keyword,capcha,td_1,td_2,td_3,td_4,td_5");
$method->method_param("FILE", "file1,file2");
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("write_point,read_point,viewType,name,use_secret,use_comment,use_list,use_reply,use_file1,use_file2,use_vote,void_html,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$c_array['point_board_name'] = $mysql->fetch("name");
/*
수정/답글 모드인 경우 원본 글 가져옴
*/
if ($mode == "modify" || $mode == "reply") {
$mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\tWHERE idno={$read}\n\t\t");
$mysql->fetchArray("ln,category,writer,me_idno,idno,use_notice,use_html,use_secret,password,use_email,email,td_1,td_2,td_3,td_4,td_5");
$wquery = $mysql->array;
}
/*
옵션값 처리