MySQLi 지원 추가

This commit is contained in:
chicpro
2015-10-12 14:12:45 +09:00
parent e016679e67
commit f1c56fe70c
23 changed files with 170 additions and 88 deletions

View File

@ -69,7 +69,7 @@ $result = sql_query($sql);
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">

View File

@ -21,7 +21,7 @@ if ($w == "")
$sql_common ";
sql_query($sql);
$fa_id = mysql_insert_id();
$fa_id = sql_insert_id();
}
else if ($w == "u")
{

View File

@ -31,7 +31,7 @@ if ($w == "")
$sql = " insert {$g5['faq_master_table']} $sql_common ";
sql_query($sql);
$fm_id = mysql_insert_id();
$fm_id = sql_insert_id();
}
else if ($w == "u")
{

View File

@ -93,7 +93,7 @@ $result = sql_query($sql);
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$sql1 = " select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ";
$row1 = sql_fetch($sql1);
$cnt = $row1['cnt'];

View File

@ -51,7 +51,7 @@ $colspan = 7;
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$s_vie = '<a href="./mail_preview.php?ma_id='.$row['ma_id'].'" target="_blank">미리보기</a>';
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);

View File

@ -27,7 +27,7 @@ if($w == "")
$sql = " insert {$g5['new_win_table']} set $sql_common ";
sql_query($sql);
$nw_id = mysql_insert_id();
$nw_id = sql_insert_id();
}
else if ($w == "u")
{

View File

@ -70,7 +70,7 @@ $result = sql_query($sql);
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
switch($row['nw_device']) {

View File

@ -17,7 +17,7 @@ if ($w == '')
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMD."' ) ";
sql_query($sql);
$po_id = mysql_insert_id();
$po_id = sql_insert_id();
}
else if ($w == 'u')
{

View File

@ -16,7 +16,7 @@ $sql_order = " order by cnt desc ";
$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$total_count = sql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산

View File

@ -5,7 +5,7 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
include_once(G5_SMS5_PATH.'/sms5.lib.php');
if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
if(!mysql_num_rows(mysql_query(" show tables like '{$g5['sms5_config_table']}' ")))
if(!sql_num_rows(sql_query(" show tables like '{$g5['sms5_config_table']}' ")))
goto_url('install.php');
// SMS 설정값 배열변수

View File

@ -53,7 +53,7 @@ eval("\$file = \"$file\";");
$f = explode(";", $file);
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == "") continue;
mysql_query($f[$i]) or die(mysql_error());
sql_query($f[$i]) or die(mysqli_error());
}
// 테이블 생성 ------------------------------------
@ -68,7 +68,7 @@ $download_point = -20;
//-------------------------------------------------------------------------------------------------
// config 테이블 설정
$sql = " insert into {$g5['sms5_book_group_table']} set bg_name='미분류'";
mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
sql_query($sql) or die(mysqli_error() . "<p>" . $sql);
echo "<script>document.getElementById('sms5_job_02').innerHTML='DB설정 완료';</script>";
flush(); usleep(50000);

View File

@ -532,7 +532,7 @@ if ($wr_no)
// 회원목록
$sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no > 0 ";
$qry = sql_query($sql);
$tot = mysql_num_rows($qry);
$tot = sql_num_rows($qry);
if ($tot > 0) {
@ -550,7 +550,7 @@ if ($wr_no)
// 비회원 목록
$sql = " select * from {$g5['sms5_history_table']} where wr_no = '$wr_no' and bk_no = 0 ";
$qry = sql_query($sql);
$tot = mysql_num_rows($qry);
$tot = sql_num_rows($qry);
if ($tot > 0)
{