You are not logged in.

#1 2009-08-19 1:02 am

knightar
Member
Registered: 2009-08-19
Posts: 1

SQL commands for phpBB issues

First off all, Thank you for the site its going to help me a lot. Second, There are errors in the "SQL commands for phpBB" download. For example:

On line 10195 of the current download is this line:
INSERT INTO `phpbb_disallow` VALUES ('', 'america's cash express fr');

The value is not escaped, thus makes me not able to import it into my database. Second, the "INSERT INTO" should really be changed to "INSERT IGNORE INTO" to prevent errors when the error exists. At the moment, I have to manually edit the file to fix the non-escaped values. If you could quickly fix this, I won't have to take the time.

Thanks!!

P.S. I also get an error on the "phpbb_banlist" inserts due to the number of values not matching the table. Probably because the difference between phpbb3 and phpbb2.

"INSERT INTO `phpbb_banlist` VALUES ('', '', '1dbc9af', 'NULL');"
should probably look like:
"INSERT IGNORE INTO `phpbb_banlist` (`ban_id`,`ban_userid`,`ban_ip`,`ban_email`) VALUES ('', '', '1dbc9af', '');"

Last edited by knightar (2009-08-19 1:34 am)

Offline

#2 2009-08-19 2:13 pm

Russ
Guest

Re: SQL commands for phpBB issues

Single quotes should be escaped now, and I changed "INSERT INTO" to "INSERT IGNORE INTO".

#3 2009-11-23 4:01 am

MOB
Member
Registered: 2009-11-22
Posts: 15

Re: SQL commands for phpBB issues

This got me curious.  Is the "IGNORE" part of the code suppose to not enter that value if that value already exists on the table?  If yes, it seems not to do this on my site.

I just conducted a test where I imported the phpbb_bans.sql file twice to see if it would not enter the data again.  Unfortunately, it did.

The main reason why I did this test, is that every other week, when you guys generate a new sql file, I just want to import it and update my tables.  But now that I see it just duplicated the data if I use that file again.  I have to find another method on how to update just the new data and not the rest that I already have.  If you have a suggestion on how to do this without getting repeated values, that would be cool.  Thanks in advance.

Last edited by MOB (2009-11-23 4:03 am)

Offline

Board footer

Powered by FluxBB

Close
Close