count를 써야할 자리에 MYDB_num_rows를 쓰는 코드 수정, 일부 정리

This commit is contained in:
2019-04-21 02:34:22 +09:00
parent 71ce5c4dcb
commit df1221ba74
9 changed files with 30 additions and 153 deletions
+2 -7
View File
@@ -27,13 +27,8 @@ if ($con >= 2) {
exit();
}
$query = "select no from auction where no1='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$tradeCount = MYDB_num_rows($result);
$query = "select no from auction where no2='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$bidCount = MYDB_num_rows($result);
$tradeCount = $db->queryFirstField('SELECT count(no) FROM auction WHERE no1=%i', $me['no']);
$bidCount = $db->queryFirstField('SELECT count(no) FROM auction where no2=%i', $me['no']);
$btCount = $tradeCount + $bidCount;