phpMyFAQ 2.0.2 update error

Please report bugs here!

Moderator: Thorsten

Post Reply
simlan
Posts: 6
Joined: Mon Oct 17, 2005 11:58 am

phpMyFAQ 2.0.2 update error

Post by simlan »

Hello!

I tried to update my database using phpMyFAQ 2.0.1 which completely fails. Then I used 2.0.2 and it partially works. I get the following error:

Code: Select all

DB error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-bkp' at line 1

Query: 
OPTIMIZE TABLE kb2_faqcategories-bkp
I changed line 1468 in update.php from

Code: Select all

$query[] = 'OPTIMIZE TABLE '.$tableName;
to

Code: Select all

$query[] = 'OPTIMIZE TABLE `'.$tableName.'`';
and it worked. You should fix this, or better, don't use the "-" sign in table names.

I'm using IIS and MySQL 5.0.37-community-nt on M$ Windows.

Cheers,
Simon Fuhrmann
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

Code: Select all

faqcategories-bkp
is not a valid phpMyFAQ tablename. Why do you have this?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
simlan
Posts: 6
Joined: Mon Oct 17, 2005 11:58 am

Post by simlan »

Hi Thorsten!

Uhm, I don't know, I thought it has been created during the update process. If not, why is it optimized then? Probably someone has created it, I'm not the only who has access to the DB.

If some queries are executed for all tables in the DB, one should probably just include some quotes for that queries, or exclude user-created tables.

Regards,
Simon
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

bkp indicates someone with database access added this table as backup table.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply