检查value是否等于int

时间:2015-07-20 10:43:04

标签: php mysql

我试图检查一个值是否等于一,

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();
  }
?>

我没有错误。请帮帮忙?

非常感谢!

0 个答案:

没有答案