melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Thu Oct 18, 2007 1:56 pm Post subject: SQL Syntax error |
|
|
I discovered an error while testing the new version of Cacti, I copied my sql database to "cacti-devel". Unfortunately this caused a number of plugins to break, I traced the problem down the the following line of code located in the setup.php files in the various plugin directories:
$sql = "show tables from " . $database_default;
The table is not properly quoted, I think it should look like:
$sql = "show tables from `" . $database_default . "`";
Notice the back-ticks that escape the database name. This is important because the hyphen I put in my dB name caused several problems with a couple of differant plugins that called this code. |
|