MioVisman / FluxBB_by_Visman

My modification of FluxBB
GNU General Public License v2.0
79 stars 13 forks source link

fix $db->prefix.'groups to $db->prefix.'`groups` #31

Closed iznogoud59 closed 1 year ago

iznogoud59 commented 1 year ago

Hi, In my database, i've not a prefix. A error occured because the reserved 'groups' word is not escape by backtick. I've fixed it now.

Vizzielli commented 1 year ago

The fix will work without any prefix only. To make it ok both for prefix and prefixless table should put the backtick before the prefix:


FROM `'.$db->prefix.'groups` WHERE
``` /
iznogoud59 commented 1 year ago

Oops! I went too fast. Thanks for the feedback. Fixed!

Vizzielli commented 1 year ago

Oops! I went too fast. Thanks for the feedback. Fixed!

np

MioVisman commented 1 year ago

It's a bad idea to use apostrophes. FluxBB is used not only with MySQL.

If tables have already been created, then

  1. set a prefix in your config.php file, exemle $dbprefix = 'forum';
  2. add this prefix to all tables in your database
iznogoud59 commented 1 year ago

Thanks for the solution, i made this. It should be made mandatory to enter a prefix for tables when setting up the site.

MioVisman commented 1 year ago

Strange GitHub behavior. I mentioned this pull request in the commit, GitHub closed it after that on its own.