我有一个表单,允许我将用户输入我的数据库.但是,每当我点击提交时,我都会收到query failed错误消息.以下是我建立的表格:
寄存器admin.php的
<form id="resgisterform" name="registerform" method="post" action="register-admin-exec.php">
<table width="300" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<th>Username </th>
<td><input name="username" type="text" class="textfield" id="username" /></td>
</tr>
<tr>
<th>First Name </th>
<td><input name="first_name" type="text" class="textfield" id="first_name" /></td>
</tr>
<tr>
<th>Last Name </th>
<td><input name="last_name" type="text" class="textfield" id="last_name" /></td>
</tr>
<tr>
<th>Muvdigital Email </th>
<td><input name="muvdigital_email" type="text" class="textfield" id="muvdigital_email" /></td>
</tr>
<tr>
<th>Personal Email </th>
<td><input name="personal_email" type="text" class="textfield" id="personal_email" /></td>
</tr>
<tr>
<th>Title </th>
<td><input name="title" type="text" class="textfield" id="title" /></td>
</tr> …Run Code Online (Sandbox Code Playgroud) 我正在我正在处理的站点中实施 elasticseach 并尝试构建多范围过滤器。有 2 个字段具有我需要过滤的范围:价格和评级。每个人都应该能够一次选择多个范围。因此,例如,您应该能够按 80-85 OR90-95的评分进行过滤,同时还可以按 10-15 OR20-25的价格进行过滤。我正在使用post_filter术语和范围过滤器,因为我正在为搜索结果构建分面导航。您可以在下面看到我发送的结构化 json。
{
"from": 0,
"size": 15,
"query": {
"multi_match": {
"query": "taz 2003",
"type": "most_fields",
"operator": "or",
"fields": [
"name",
"vintage",
"brand^4",
"review"
],
"fuzziness": "1"
}
},
"post_filter": {
"bool": {
"must": [
{
"term": {
"vintage": "2009"
}
}
],
"should": [
{
"range": {
"price": {
"gte": 10,
"lt": 15
}
}
},
{
"range": {
"price": {
"gte": 20,
"lt": 25
}
} …Run Code Online (Sandbox Code Playgroud)