$r = mysql_query ("SELECT guid FROM characters");
if (mysql_num_rows($r) != 0) {
while ($row == mysql_fetch_array ($r)) {
$cap = rand (0, $char);
if ($row ['guid'] != $cap) {
$captain = rand (0, $char);
}
}
} else {
$captain = rand (0, $char);
}
此代碼應該返回字符的GUID,它不會記錄在字符表中。第一部分,如果工作,但循環不工作,我試圖添加打印「文本」;在它裏面,但它沒有任何回報。雖然循環不起作用