admin管理员组文章数量:1130349
I have this error when i open the page...but once i select the city from dropdown list,the error doesn't exist. Error is like this:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
SELECT * FROM wp_city_details WHERE id=
I have city dropdown list like this:
<select class="form-control" name="city" id="city" onchange="this.form.submit();">
<option value="0 ----"></option>
<?php
$i = 1;
$cities = all_cities();
foreach ($cities as $city){
$value = $i . " " . $city;
?>
<option
<?php
if (isset($_POST["city"])){
if ($_POST["city"] == $value){
?> selected="true" <?php
};
}
?>
value="<?php echo $value; ?>"><?php echo $city;?></option>
<?php
$i++;
}
?>
</select>
I have this error when i open the page...but once i select the city from dropdown list,the error doesn't exist. Error is like this:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1]
SELECT * FROM wp_city_details WHERE id=
I have city dropdown list like this:
<select class="form-control" name="city" id="city" onchange="this.form.submit();">
<option value="0 ----"></option>
<?php
$i = 1;
$cities = all_cities();
foreach ($cities as $city){
$value = $i . " " . $city;
?>
<option
<?php
if (isset($_POST["city"])){
if ($_POST["city"] == $value){
?> selected="true" <?php
};
}
?>
value="<?php echo $value; ?>"><?php echo $city;?></option>
<?php
$i++;
}
?>
</select>
本文标签: phpWordpress database error only while loading page for 1st time
版权声明:本文标题:php - Wordpress database error only while loading page for 1st time 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749088098a2314091.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论