本文整理汇总了PHP中mysqlConnection::numRows方法的典型用法代码示例。如果您正苦于以下问题:PHP mysqlConnection::numRows方法的具体用法?PHP mysqlConnection::numRows怎么用?PHP mysqlConnection::numRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mysqlConnection
的用法示例。
在下文中一共展示了mysqlConnection::numRows方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>";
}
}
示例2:
$mysql->fetchArray("use_likes");
$c_array = $mysql->array;
/*
검사
*/
if ($c_array['use_likes'] == "N") {
$validator->validt_diserror("", "추천 기능 비활성 중입니다.");
}
if ($member['me_level'] > 9) {
$validator->validt_diserror("", "추천 권한이 없습니다.\n\n추천/비추천은 회원만 가능합니다.");
}
/*
이미 추천.비추천 했는지 검사
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_like\n\t\tWHERE board_id='{$board_id}' AND read_idno='{$read_idno}' AND me_idno='{$member['me_idno']}'\n\t");
if ($mysql->numRows() > 0) {
$validator->validt_diserror("", "이미 참여 하였습니다.");
}
/*
추천/비추천 처리
*/
if ($mode == "likes") {
$likes = 1;
$unlikes = 0;
$return_where = "AND likes>0";
} else {
$likes = 0;
$unlikes = 1;
$return_where = "AND unlikes>0";
}
$mysql->query("\n\t\tINSERT INTO toony_module_board_like\n\t\t(board_id,read_idno,me_idno,likes,unlikes,regdate)\n\t\tVALUES\n\t\t('{$board_id}','{$read_idno}','{$member['me_idno']}','{$likes}','{$unlikes}',now())\n\t");
示例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}]");
$footer->skin_html_load($tpl->skin);
示例4: use_checked
$array['use_ico_secret_m'] = $ico_secret_exp[1];
$array['use_ico_secret_def'] = $array['ico_secret_def'];
$ico_new_exp = explode("|", $array['ico_new']);
$array['use_ico_new_p'] = $ico_new_exp[0];
$array['use_ico_new_m'] = $ico_new_exp[1];
$ico_hot_exp = explode("|", $array['ico_hot']);
$array['use_ico_hot_p'] = $ico_hot_exp[0];
$array['use_ico_hot_m'] = $ico_hot_exp[1];
$ico_hot_def_exp = explode("|", $array['ico_hot_def']);
$array['ico_hot_def0'] = $ico_hot_def_exp[0];
$array['ico_hot_def1'] = $ico_hot_def_exp[1];
$array['ico_hot_def2'] = $ico_hot_def_exp[2];
/*
검사
*/
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");
}
/*
템플릿 로드
*/
$tpl->skin_file_path("modules/board/admin/_tpl/boardList_modify.html");
/*
템플릿 함수
*/
function use_checked($var, $fieldName)
{
global $array;
示例5: explode
if ($viewType == "p") {
$ex_slt = 0;
} else {
$ex_slt = 1;
}
$use_list_ex = explode("|", $c_array['use_list']);
$c_array['use_list'] = $use_list_ex[$ex_slt];
$articleIMG_width_ex = explode("|", $c_array['articleIMG_width']);
$c_array['articleIMG_width'] = $articleIMG_width_ex[$ex_slt];
$articleIMG_height_ex = explode("|", $c_array['articleIMG_height']);
$c_array['articleIMG_height'] = $articleIMG_height_ex[$ex_slt];
/*
게시물 정보 로드
*/
$mysql->select("\n\t\tSELECT\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_module_board_like\n\t\t\tWHERE board_id='{$board_id}' AND read_idno='{$read}' AND likes>0\n\t\t) likes_count,\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_module_board_like\n\t\t\tWHERE board_id='{$board_id}' AND read_idno='{$read}' AND unlikes>0\n\t\t) unlikes_count,\n\t\tA.*\n\t\tFROM toony_module_board_data_{$board_id} A\n\t\tWHERE A.idno='{$read}'\n\t");
if ($mysql->numRows() < 1) {
$lib->error_alert_location("해당 게시물이 존재하지 않습니다.", __URL_PATH__ . $viewDir, "A");
}
$mysql->htmlspecialchars = 1;
$mysql->nl2br = 1;
$mysql->fetchArray("rn,ln,category,regdate,subject,writer,me_idno,cmtnum,view,vote,password,use_secret,use_notice,use_html,me_idno,file1,file1_cnt,file2,file2_cnt,likes_count,unlikes_count,td_1,td_2,td_3,td_4,td_5");
$array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$mysql->fetchArray("ment");
$array = $mysql->array;
/*
게시물이 답글이고, 회원에 대한 답글인 경우 부모글의 정보를 로드
*/
if ($array['rn'] > 0 && $array['password'] == "") {
$mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\tWHERE ln>{$array['ln']} AND rn={$array['rn']}-1\n\t\t\tORDER BY ln ASC\n\t\t\tLIMIT 1\n\t\t");
示例6: libraryClass
include "../../../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$validator = new validator();
$method->method_param("POST", "type,board_id,skin,name,use_list,use_m_list,use_secret,use_comment,use_likes,use_reply,use_category,category,use_file1,use_file2,file_limit,list_limit,list_m_limit,length_limit,length_m_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,controll_level,reply_level,write_point,read_point,top_file,top_source,bottom_file,bottom_source,thumb_width,thumb_m_width,thumb_height,thumb_m_height,articleIMG_width,articleIMG_m_width,articleIMG_height,articleIMG_m_height,article_length,article_m_length,ico_file_p,ico_file_m,ico_mobile_p,ico_mobile_m,ico_secret_p,ico_secret_m,ico_secret_def,ico_new_p,ico_new_m,ico_new_def,ico_hot_def_v,ico_hot_def_r,ico_hot_def_type,ico_hot_p,ico_hot_m,tc_1,tc_2,tc_3,tc_4,tc_5");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/*
검사
*/
if ($type == "new") {
$mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id='{$board_id}'\n\t\t");
if ($mysql->numRows() > 0) {
$validator->validt_diserror("board_id", "이미 존재하는 코드입니다.");
}
$validator->validt_idx("board_id", 1, "");
}
$validator->validt_null("name", "");
$validator->validt_number("list_limit", 1, 10, 1, "");
$validator->validt_number("list_m_limit", 1, 10, 1, "");
$validator->validt_number("length_limit", 1, 10, 1, "");
$validator->validt_number("length_m_limit", 1, 10, 1, "");
$validator->validt_number("file_limit", 1, 10, 1, "");
$validator->validt_number("article_length", 1, 10, 1, "");
$validator->validt_number("article_m_length", 1, 10, 1, "");
$validator->validt_number("write_point", 1, 10, 1, "");
$validator->validt_number("read_point", 1, 10, 1, "");
$validator->validt_number("thumb_width", 1, 10, 1, "");
示例7:
<body>
<table style="display:none;">
<thead>
<tr>
<th>여자</th>
<th>남자</th>
</tr>
</thead>
<tbody>
<tr>
<th>여자</th>
<?php
$mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_member_list\n\t\t\t\t\tWHERE me_sex='F'\n\t\t\t\t");
?>
<td><?php
echo (int) $mysql->numRows();
?>
</td>
</tr>
<tr>
<th>남자</th>
<?php
$mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_member_list\n\t\t\t\t\tWHERE me_sex='M'\n\t\t\t\t");
?>
<td><?php
echo (int) $mysql->numRows();
?>
</td>
</tr>
</tbody>
</table>
示例8: while
type:'area',
width:'557px',
height:'130px',
lineWeight:'2'
});
});
</script>
</head>
<body>
<table style="display:none;">
<thead>
<tr>
<td></td>
<?php
$mysql->select("\n\t\t\t\t\tSELECT DATE_FORMAT(regdate,'%m') month,DATE_FORMAT(regdate,'%Y') year\n\t\t\t\t\tFROM toony_admin_counter \n\t\t\t\t\tWHERE regdate>DATE_SUB(now(),INTERVAL 5 month)\n\t\t\t\t\tGROUP BY year,month\n\t\t\t\t\tORDER BY year ASC, month ASC\n\t\t\t\t\tLIMIT 6\n\t\t\t\t");
$monthCount = $mysql->numRows();
if ($mysql->numRows() > 0) {
do {
$mysql->fetchArray("year,month");
$array = $mysql->array;
?>
<th><?php
echo $array['year'];
?>
.<?php
echo $array['month'];
?>
</th>
<?php
} while ($mysql->nextRec());
}
示例9: call_board_latest
function call_board_latest($viewType, $article, $board_id, $line, $length, $ment_length, $skin, $width, $height, $margin, $quard)
{
if ($viewType == "p") {
$viewDir = "";
$viewSkinType = "";
} else {
$viewDir = "m/";
$viewSkinType = "_mobile";
}
$mysql = new mysqlConnection();
$tpl = new skinController();
$lib = new libraryClass();
$tpl = new skinController();
$header = new skinController();
$loop = new skinController();
$footer = new skinController();
$mysql->select("\n\t\t\tSELECT name\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id='{$board_id}'\n\t\t");
$mysql->fetchArray("name");
$array = $mysql->array;
//게시판이 존재하지 않는다면 오류 출력
if (!$array['name']) {
return "최근게시물에서 설정된 게시판이 존재하지 않습니다.";
}
//게시판이 존재한다면 게시물 출력
$mysql->select("\n\t\t\tSELECT\n\t\t\t(\n\t\t\t\tSELECT COUNT(*)\n\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\tWHERE bo_idno=A.idno\n\t\t\t) comment,\n\t\t\t(\n\t\t\t\tSELECT ico_new_def\n\t\t\t\tFROM toony_module_board_config\n\t\t\t\tWHERE board_id='{$board_id}'\n\t\t\t) ico_new_def,\n\t\t\t(\n\t\t\t\tSELECT ico_hot_def\n\t\t\t\tFROM toony_module_board_config\n\t\t\t\tWHERE board_id='{$board_id}'\n\t\t\t) ico_hot_def,\n\t\t\tA.*\n\t\t\tFROM toony_module_board_data_{$board_id} A\n\t\t\tWHERE A.use_notice='N' AND rn=0\n\t\t\tORDER BY A.ln DESC, A.regdate DESC\n\t\t\tLIMIT {$line}\n\t\t");
//최근게시물 템플릿 로드
$tpl->skin_file_path("modules/board/latestskin/{$skin}/index{$viewSkinType}.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}]");
$footer->skin_html_load($tpl->skin);
$footer->skin_loop_footer("[{loop_end}]");
//header 템플릿 치환
$header->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
$header->skin_modeling('[title]', htmlspecialchars($array['name']));
$header->skin_modeling('[board_link]', __URL_PATH__ . $viewDir . '?article=' . $article);
$tpl = $header->skin_echo();
//loop 템플릿 치환
if ($mysql->numRows() > 0) {
do {
$array['memo'] = strip_tags($mysql->fetch("memo"));
$mysql->htmlspecialchars = 0;
$mysql->fetchArray("board_id,idno,subject,ment,regdate,idno,file1,file2,comment,writer,ico_new_def,ico_hot_def,view,use_secret");
$array = $mysql->array;
$loop->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
$loop->skin_modeling('[thumbnail]', call_board_latest_thumbnail_func($viewType, $article, $board_id, $array['idno'], $array['file1'], $array['file2'], $array['ment'], $width, $height, $quard, $margin));
$loop->skin_modeling('[subject]', $lib->func_length_limit($array['subject'], 0, $length));
$loop->skin_modeling('[ment]', $lib->func_length_limit(strip_tags($array['ment']), 0, $ment_length));
$loop->skin_modeling('[date]', date("Y.m.d", strtotime($array['regdate'])));
$loop->skin_modeling('[nick]', $array['writer']);
$loop->skin_modeling('[comment]', latest_comment_func($array['comment']));
$loop->skin_modeling('[link]', __URL_PATH__ . $viewDir . '?article=' . $article . '&p=read&read=' . $array['idno']);
$loop->skin_modeling('[new_ico]', latest_new_ico($array['ico_new_def'], $array['regdate']));
$loop->skin_modeling('[hot_ico]', latest_hot_ico($array['ico_hot_def'], $array['likes_count'], $array['view']));
$loop->skin_modeling('[secret_ico]', latest_secret_ico($array['use_secret']));
$tpl .= $loop->skin_echo();
} while ($mysql->nextRec());
}
//footer 템플릿 치환
if ($mysql->numRows() < 1) {
$footer->skin_modeling_hideArea("[{not_loop_start}]", "[{not_loop_end}]", "show");
} else {
$footer->skin_modeling_hideArea("[{not_loop_start}]", "[{not_loop_end}]", "hide");
}
$footer->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
$footer->skin_modeling('[title]', htmlspecialchars($array['name']));
$footer->skin_modeling('[board_link]', __URL_PATH__ . $viewDir . '?article=' . $article);
$tpl .= $footer->skin_echo();
return $tpl;
}
示例10: MAX
$tar_mysql->query("\n\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\ttoony_module_board_data_{$tar_board_id}\n\t\t\t\t\t\t(category,ln,rn,me_idno,writer,password,email,ment,subject,file1,file1_cnt,file2,file2_cnt,link1,link2,use_secret,use_html,use_email,view,ip,regdate,td_1,td_2,td_3,td_4,td_5)\n\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t('{$array['category']}','{$tar_ln}','{$array['rn']}','{$array['me_idno']}','{$array['writer']}','{$array['password']}','{$array['email']}','{$array['ment']}','{$array['subject']}','{$file1Name}','{$array['file1_cnt']}','{$file2Name}','{$array['file2_cnt']}','{$array['link1']}','{$array['link2']}','{$array['use_secret']}','{$array['use_html']}','{$array['use_email']}','{$array['view']}','{$array['ip']}',now(),'{$array['td_1']}','{$array['td_2']}','{$array['td_3']}','{$array['td_4']}','{$array['td_5']}')\n\t\t\t\t\t");
//이동된 글의 idno값을 다시 불러옴
$tar_mysql->select("\n\t\t\t\t\t\tSELECT idno\n\t\t\t\t\t\tFROM toony_module_board_data_{$tar_board_id}\n\t\t\t\t\t\tWHERE ln='{$tar_ln}'\n\t\t\t\t\t");
$tar_read_idno = $tar_mysql->fetch("idno");
//좋아요 이동
$tar_mysql->query("\n\t\t\t\t\t\tUPDATE\n\t\t\t\t\t\ttoony_module_board_like\n\t\t\t\t\t\tSET\n\t\t\t\t\t\tboard_id='{$tar_board_id}',read_idno='{$tar_read_idno}'\n\t\t\t\t\t\tWHERE board_id='{$board_id}' AND read_idno='{$array['idno']}'\n\t\t\t\t\t");
//댓글 복사를 위한 대상 댓글 테이블의 ln값 구함
$tar_mysql->select("\n\t\t\t\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\t\t\t\tFROM toony_module_board_comment_{$tar_board_id}\n\t\t\t\t\t\tWHERE 1\n\t\t\t\t\t\tORDER BY ln DESC\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t");
$c_tar_ln = $tar_mysql->fetch("ln_max");
if (!$c_tar_ln) {
$c_tar_ln = 1000;
}
$c_tar_ln = ceil($c_tar_ln / 1000) * 1000;
//댓글 복사를 위한 원본 댓글 테이블의 댓글 추출
$tar_mysql->select("\n\t\t\t\t\t\tSELECT *\n\t\t\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\t\t\tWHERE bo_idno='{$array['idno']}'\n\t\t\t\t\t");
if ($tar_mysql->numRows() > 0) {
do {
$tar_mysql->htmlspecialchars = 0;
$tar_mysql->nl2br = 0;
$tar_mysql->fetchArray("ln,rn,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5");
$c_array = $tar_mysql->array;
//가져온 원본들의 내용을 addslashes 시킴
foreach ($c_array as $key => $value) {
$c_array[$key] = addslashes($c_array[$key]);
}
$c_tar_mysql->query("\n\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\ttoony_module_board_comment_{$tar_board_id}\n\t\t\t\t\t\t\t\t(ln,rn,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5)\n\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t('{$c_array['ln']}','{$c_array['rn']}','{$tar_read_idno}','{$c_array['me_idno']}','{$c_array['writer']}','{$c_array['comment']}','{$c_array['ip']}','{$c_array['regdate']}','{$c_array['tr_1']}','{$c_array['tr_2']}','{$c_array['tr_3']}','{$c_array['tr_4']}','{$c_array['tr_5']}')\n\t\t\t\t\t\t\t");
} while ($tar_mysql->nextRec());
}
//기존 댓글 삭제
$tar_mysql->query("\n\t\t\t\t\t\tDELETE\n\t\t\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\t\t\tWHERE bo_idno='{$array['idno']}'\n\t\t\t\t\t");
//원본글 삭제
示例11: 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();
示例12:
$btn .= "<li><a href=\"" . __URL_PATH__ . "admin/\">관리모드</a></li>";
}
return $btn;
}
/*
템플릿 치환
*/
//header
$header->skin_modeling("[logo]", site_logo());
$header->skin_modeling("[site_url]", site_url_func());
$header->skin_modeling("[site_name]", $site_config['ad_site_name']);
$header->skin_modeling("[status]", status_func());
$header->skin_modeling("[/layoutskinDir/]", __URL_PATH__ . "layoutskin/" . CALLED_LAYOUTDIR);
echo $header->skin_echo();
//loop
$max_repeat = $mysql->numRows();
if ($mysql->numRows() > 0) {
$depthRound = 0;
$repeatCount = 0;
do {
$mysql->fetchArray("idno,callName,name,class,depth,zindex,link,linkDoc,img,img2,lockMenu,href");
$array = $mysql->array;
//현재 페이지가 메뉴의 링크와 같을 경우 '.active' 클래스 추가,
//메뉴 이미지가 있는 경우 메뉴명을 이미지로 대체
if ((CALLED_ARTICLE == $array['callName'] || CALLED_CLASS == $array['idno']) && $array['lockMenu'] == "N") {
if ($array['img2']) {
$menu_img = "<img src=\"" . __URL_PATH__ . "upload/siteInformations/" . $array['img2'] . "\" />";
} else {
if ($array['img']) {
$menu_img = "<img src=\"" . __URL_PATH__ . "upload/siteInformations/" . $array['img'] . "\" />";
} else {