meekroDB 에서는 숫자는 %i임
This commit is contained in:
+4
-9
@@ -99,7 +99,7 @@ if($src_nation_id == 0) {
|
|||||||
$src_color = '#FFFFFF';
|
$src_color = '#FFFFFF';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array(
|
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i_nation",array(
|
||||||
'nation' => $src_nation_id
|
'nation' => $src_nation_id
|
||||||
));
|
));
|
||||||
$src_nation = $nation['name'];
|
$src_nation = $nation['name'];
|
||||||
@@ -128,9 +128,7 @@ if($dest == 9999) {
|
|||||||
} elseif($dest >= 9000) {
|
} elseif($dest >= 9000) {
|
||||||
$real_nation = $dest - 9000;
|
$real_nation = $dest - 9000;
|
||||||
$query = "select nation,name,color from nation where nation='$genlist'";
|
$query = "select nation,name,color from nation where nation='$genlist'";
|
||||||
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array(
|
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$real_nation);
|
||||||
'nation' => $real_nation
|
|
||||||
));
|
|
||||||
|
|
||||||
if($nation === NULL || empty($nation)){
|
if($nation === NULL || empty($nation)){
|
||||||
$dest = 9998;
|
$dest = 9998;
|
||||||
@@ -207,8 +205,7 @@ if($dest == 9999) {
|
|||||||
|
|
||||||
$_SESSION['last_msg'] = $date;
|
$_SESSION['last_msg'] = $date;
|
||||||
|
|
||||||
$dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s_p_id',array(
|
$dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$dest);
|
||||||
'p_id'=>$dest));
|
|
||||||
|
|
||||||
if($dest_user == NULL || empty($dest_user)){
|
if($dest_user == NULL || empty($dest_user)){
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
@@ -226,9 +223,7 @@ if($dest == 9999) {
|
|||||||
$dest_color = str_replace('##', '#', $dest_color);
|
$dest_color = str_replace('##', '#', $dest_color);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array(
|
$nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$dest_user['nation']);
|
||||||
'nation' => $dest_user['nation']
|
|
||||||
));
|
|
||||||
$dest_nation = $nation['name'];
|
$dest_nation = $nation['name'];
|
||||||
$dest_color = '#'.$nation['color'];
|
$dest_color = '#'.$nation['color'];
|
||||||
$dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비
|
$dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비
|
||||||
|
|||||||
Reference in New Issue
Block a user