我试图检查一个值是否等于一,
variables.php
<?php
$server = "localhost";
$username = "root";
$password = "xxxx";
$dbName = "website2";
$link = mysql_connect($server, $username, $password, $dbName);
$maintenanceMode = mysqli_query($link, "SELECT * FROM website_checks WHERE maintenanceMode = '1'");
?>
的index.php
<?php
include 'mysql/variables.php';
?>
<?php
if ($maintenanceMode == '1') {
echo "hello";
} else {
echo mysql_error();
}
?>
我没有错误。请帮帮忙?
非常感谢!