Jump to content

Mysql_fetch_array?


MrFish
 Share

Recommended Posts

At the beginning of every page I want it to check if I have the site down for maintenance (for future use). If it does then the page loads a "Down for Maintenance" page. If not, it loads regularly. I'm trying to get my script to read what the maintenance field in my system_status table says. It will either say true or false. But when I try and show an alert of the value, it comes up blank.

mysql_select_db("b17_3648160_systemdb", $con);$query= "SELECT * FROM system_status";$run= mysql_query($query);$results = mysql_fetch_array($run);alert($results['maintenance']);

It should show "false". Also, alert is a custom function which works with other text.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...