Hi. Does anyone know why this doesn't work? I get query failed 2. All I want it to do is update the db when the page is loaded. Thanks.
<?php
include "config.php";
$dbconn = mysql_connect($hostname, $db_login, $db_pass) or die("Could not connect");
$query = "UPDATE officehours SET hours=Closed WHERE id=1";
$result = mysql_query($query) or die("Query failed2");
mysql_close($dbconn);
?>