경로 및 전체테이블명 변경
This commit is contained in:
@ -47,18 +47,18 @@ $url = "./item.php?it_id=$it_id";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[yc4_item_qa_table] ";
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[shop_item_qa_table] ";
|
||||
$row = sql_fetch($sql);
|
||||
$max_iq_id = $row[max_iq_id];
|
||||
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[yc4_item_qa_table]
|
||||
$sql = " select max(iq_id) as max_iq_id from $g4[shop_item_qa_table]
|
||||
where it_id = '$it_id'
|
||||
and mb_id = '$member[mb_id]' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[max_iq_id] && $row[max_iq_id] == $max_iq_id)
|
||||
alert("같은 상품에 대하여 계속해서 질문 하실 수 없습니다.");
|
||||
|
||||
$sql = "insert $g4[yc4_item_qa_table]
|
||||
$sql = "insert $g4[shop_item_qa_table]
|
||||
set it_id = '$it_id',
|
||||
mb_id = '$member[mb_id]',
|
||||
iq_name = '$iq_name',
|
||||
@ -73,12 +73,12 @@ if ($w == '')
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " select iq_password from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$sql = " select iq_password from $g4[shop_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[iq_password] != $iq_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update $g4[yc4_item_qa_table]
|
||||
$sql = " update $g4[shop_item_qa_table]
|
||||
set iq_subject = '$iq_subject',
|
||||
iq_question = '$iq_question'
|
||||
where iq_id = '$iq_id' ";
|
||||
@ -90,7 +90,7 @@ else if ($w == 'd')
|
||||
{
|
||||
if ($is_member)
|
||||
{
|
||||
$sql = " select count(*) as cnt from $g4[yc4_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$sql = " select count(*) as cnt from $g4[shop_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row[cnt])
|
||||
alert("자신의 상품문의만 삭제하실 수 있습니다.");
|
||||
@ -99,13 +99,13 @@ else if ($w == 'd')
|
||||
{
|
||||
$iq_password = sql_password($iq_password);
|
||||
|
||||
$sql = " select iq_password from $g4[yc4_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$sql = " select iq_password from $g4[shop_item_qa_table] where iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row[iq_password] != $iq_password)
|
||||
alert("패스워드가 틀리므로 삭제하실 수 없습니다.");
|
||||
}
|
||||
|
||||
$sql = " delete from $g4[yc4_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
$sql = " delete from $g4[shop_item_qa_table] where mb_id = '$member[mb_id]' and iq_id = '$iq_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url($url);
|
||||
|
||||
Reference in New Issue
Block a user