sproctor / php-calendar

PHP-Calendar
http://www.php-calendar.org/
Apache License 2.0
140 stars 67 forks source link

Non-existing $phpc_db_version #98

Closed kroeckx closed 10 years ago

kroeckx commented 10 years ago

In install.php there are several places that mention $phpc_db_version, some say it's a global variable, others don't. But this variable isn't assigned any value in any file.

There is also an SQL syntax error trying to update it.  It says:
       $query = "REPLACE INTO `" . SQL_PREFIX . "config`\n"
                ."VALUES (`name`, `value`)\n"
                ."('version', '$phpc_db_version')";

the VALUES should be after the first ().

sproctor commented 10 years ago

Install.php from HEAD is not usable. Stick with the 2.0.x branch.

st8ingenious commented 10 years ago

just replace with this

$query = "REPLACE INTO `" . SQL_PREFIX . "config`\n"
        ."(`name`, `value`)\n"
        ."VALUES('version', '$phpc_db_version')";

it worked for me

sproctor commented 10 years ago

Applied.