소스 검색

i guess inserts work if you skip the variable

development
mauirixxx 8 년 전
부모
커밋
7ef727e409
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +3
    -3
      gw-insert.php

+ 3
- 3
gw-insert.php 파일 보기

@@ -27,20 +27,20 @@ if ($droptype == 1){
} }
} else if ($droptype == 2){ } else if ($droptype == 2){
$matid = mysqli_real_escape_string($con, $_POST['rarematerial']); $matid = mysqli_real_escape_string($con, $_POST['rarematerial']);
$sqlmatins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, material) VALUES ('$treasdate', $toonid, $locid, $gold, $matid)";
$sqlmatins = "INSERT INTO `history` (historydate, userid, charnameid, locationid, goldrec, material) VALUES ('$treasdate', $uid, $toonid, $locid, $gold, $matid)";
if (!$result = $con->query($sqlmatins)){ if (!$result = $con->query($sqlmatins)){
die ('There was an error running the query [' . $con->error . ']'); die ('There was an error running the query [' . $con->error . ']');
} }
} else if ($droptype == 3){ } else if ($droptype == 3){
$runeid = mysqli_real_escape_string($con, $_POST['rune']); $runeid = mysqli_real_escape_string($con, $_POST['rune']);
$runerare = mysqli_real_escape_string($con, $_POST['runerarity']); $runerare = mysqli_real_escape_string($con, $_POST['runerarity']);
$sqlruneins = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemtype, itemrarity, runetype) VALUES ('$treasdate', $toonid, $locid, $gold, '16', $runerare, $runeid)";
$sqlruneins = "INSERT INTO `history` (historydate, userid, charnameid, locationid, goldrec, itemtype, itemrarity, runetype) VALUES ('$treasdate', $uid, $toonid, $locid, $gold, '16', $runerare, $runeid)";
if (!$result = $con->query($sqlruneins)){ if (!$result = $con->query($sqlruneins)){
die ('There was an error running the query [' . $con->error . ']'); die ('There was an error running the query [' . $con->error . ']');
} }
} else if ($droptype == 4){ } else if ($droptype == 4){
$itname = mysqli_real_escape_string($con, $_POST['itemname']); $itname = mysqli_real_escape_string($con, $_POST['itemname']);
$sqlnothing = "INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemname) VALUES ('$treasdate', $uid, $toonid, $locid, $gold, '$itname')";
$sqlnothing = "INSERT INTO `history` (historydate, userid, charnameid, locationid, goldrec, itemname) VALUES ('$treasdate', $uid, $toonid, $locid, $gold, '$itname')";
if (!$result = $con->query($sqlnothing)){ if (!$result = $con->query($sqlnothing)){
die ('There was an error running the query [' . $con->error . ']'); die ('There was an error running the query [' . $con->error . ']');
} }


불러오는 중...
취소
저장