這是我有:mysqli的改變表問題
if($_POST['submit']) {
$newAward = new AwardCenter($mysqli);
$arrColumns = array("name", "description", "imageurl", "imagewidth", "imageheight", "autodays", "autorecruits", "category", "subcategory", "ghosts", "advancedwarfare", "blackops3");
$arrValues = array($_POST['newawardname1'], $_POST['description1'], $_POST['imageurl1'], $_POST['imagewidth1'], $_POST['imageheight1'], $_POST['autodays1'], $_POST['autorecruits1'], $_POST['category1'], $_POST['subcategory1'], $_POST['ghosts1'], $_POST['advancedwarfare1'], $_POST['blackops31'],);
if($newAward->addNew($arrColumns, $arrValues)) {
$newAwardInfo = $newAward->get_info_filtered();
$result = $mysqli->query("ALTER TABLE ".$dbprefix."clanawards_members ADD '".$newAwardInfo['name']."' INT(11) NOT NULL DEFAULT '0'");
echo "
<div style='display: none' id='successBox'>
<p align='center'>
Successfully Added New Award: <b>".$newAwardInfo['name']."</b>!
</p>
</div>
<script type='text/javascript'>
popupDialog('Award Center: Location', '".$MAIN_ROOT."members/console.php?cID=".$cID."', 'successBox');
</script>
";
}
}
的問題是,在alter table不執行的。 add new command works
您可能需要前綴變量 – user2182349
前綴變量前的空格嗎?哪一個? –
正在尋找Java,發現PHP。 | - ) – itwasntme