我主要有一个关于mysql的问题。我有以下内容:
mysql_query("INSERT INTO {$game}_ships (location,login_id
) values(
'250','44')");
Run Code Online (Sandbox Code Playgroud)
我想将位置设置为 2 到 300 之间的随机数。
我的表结构包括位置和登录 ID 列,我不需要提及其他列,因为它们是静态的并且不会改变。上面的内容应该使一艘船看起来像是在系统中移动。
location int(4)
Run Code Online (Sandbox Code Playgroud)
有人能帮忙吗?
我不知道如何问这个,所以我只想说.我有以下内容:
<style type="text/css">
div.background
{
width:300px;
height:120px;
background:url(<?php
echo '<img src="img/ships/ship_'.$user_ship['shipclass'].'_tn.jpg" />'
?>) repeat;
border:2px solid black;
}
div.transbox
{
width:200px;
height:100px;
margin:30px 50px;
background-color:#ffffff;
border:1px solid black;
opacity:0.6;
filter:alpha(opacity=60); /* For IE8 and earlier */
}
div.transbox p
{
margin:30px 40px;
font-weight:bold;
color:#000000;
}
</style>
</head>
<body>
<div class="background">
<div class="transbox">
<p>This is some text that is placed in the transparent box.
This is some text that is placed in the transparent box.
This is some text that is …Run Code Online (Sandbox Code Playgroud) 我有以下代码:
$result = mysql_query("select * from ${db_name}_users limit 1");
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
if ($player[$ships_killed] == 1)
echo "1";
else if ($player[$ships_killed] == 2)
echo "2";
else if ($player[$ships_killed] == 3)
echo "3";
else if ($player[$ships_killed] == 4)
echo "4";
else if ($player[$ships_killed] == 5)
echo "5";
else if ($player[$ships_killed] =< 10)
echo "10";
else if ($player[$ships_killed] =< 15)
echo "15";
else if ($player[$ships_killed] =< 20)
echo "20";
else
echo "Over Range";
}
Run Code Online (Sandbox Code Playgroud)
我对less than or equal …