当设置//PHP
if(isset($_POST["priority"]) && $_POST["priority"] == 'not_selected'){
$err_priority = "Please assign the priority level!";
}
else {
$priority = $_POST["priority"];
}
$sql1 = "INSERT INTO person (priority) VALUES (?)";
if ($stmt1 = mysqli_prepare($conn, $sql1) or die(mysqli_error($conn))) {
mysqli_stmt_bind_param($stmt1, 's', $priority);
}
mysqli_stmt_execute($stmt1);
mysqli_stmt_close($stmt1);
//HTML-Form
<div class="form-group <?php echo(!empty($err_priority)) ? 'has-error' : ''; ?>">
<label>Priority</label>
<?php
echo '<select name="priority">';
$sql = "SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'person' AND COLUMN_NAME = 'priority'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($result);
$enumlist = explode( ",", str_replace("'", "", substr($row['COLUMN_TYPE'], 5, (strlen($row['COLUMN_TYPE'])-6))));
foreach ($enumlist as $value_p) {
echo '<option value="$value_p">'.$value_p.'</option>';
}
echo '</select>';
?>
<span class="help-block"><?php echo "$err_priority"; ?></span>
</div>
<div class="form-group">
<input type="submit" class="btnsml" value="Add Contact">
</div>
导致sideEffects=false
然后抛出异常,如何解决?
RuntimeTemplate.moduleId():模块D:\ mobile-chat \ node_modules \ happypack \ loader.js?id = jsx!D:\ mobile-chat \ node_modules \ @xxx \ configs \ app \ index.js没有ID。这不应该发生。
答案 0 :(得分:1)
您使用的是Webpack production
或更高版本吗?
我相信最新的Webpack版本an issue在v4.9.2
模式下给出了类似的错误。
尝试降级到view -> indentation -> *
并再次运行Webpack。