Now it says
MYSQL SEEMS OKMYSQL DOES NOT RETURN ANYTHING
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 17 in C:\xampp\htdocs\includes\class.core.php on line 202
Printable View
That's strange...
What happens when you enter this within PHPMyAdmin:
SELECT maintenance FROM site_config LIMIT 1;
Execute
and use your original inc.core.phpCode:"INSERT INTO site_config (maintenance) VALUES (1);
I had this issue before, I just did this.
and it seemed to fix it.
TRUNCATE TABLE `site_config`
I'm sorry if it doesn't for you.
Kind Regards,
XiFy
Yeah, but" i just ran this query" isn't any explanation and if you know about MySQL then you'd be able to read the error message.
Perhaps you've got a cms that automatically returns 0 when it doesn't receive any data
Sry, I was a bit unprecise...
You should execute the query above with PHPMyAdmin and then replace
withPHP Code:public static function GetMaintenanceStatus()
{
$sql = dbquery("SELECT maintenance FROM site_config LIMIT 1");
if(!$sql)
echo mysql_error();
else
echo "MYSQL SEEMS OK";
if(mysql_num_rows($sql) != 1)
echo "MYSQL DOES NOT RETURN ANYTHING";
else
echo "EVERYTHINGS OK";
return mysql_result($sql,0);
}
PHP Code:public static function GetMaintenanceStatus()
{
return mysql_result(dbquery("SELECT maintenance FROM site_config LIMIT 1"),0);
}
what???? Did you delete your index file or what?
Do you test upon localhost or do you have a live site?