My-Little-Forum / mylittleforum

A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)
GNU General Public License v3.0
124 stars 48 forks source link

Collect the table names from the existing entries in $db_settings #735

Closed auge8472 closed 3 months ago

auge8472 commented 3 months ago

For changing the database engine of tables to InnoDB we collect the affected table names with a query. For this purpose I wrote a list with all possible table names in an IN(). Problem was, that I listed every possible table name in its representation in the array $db_settings even the table and with it its element in the array does not exist in the current version, that should be upgraded. With a correspondingly configured error level, an error was generated due to the non-existent array elements in $db_settings.

I now collect the existing table name entries in $db_settings in a loop and inserting the resulting imploded string to the query. This ensures to not using non existing table names.

auge8472 commented 3 months ago

@loesler please take a look on the code. On the one side it looks o.k. for me but on the other side I overlooked a few very simple errors I made in the last time.

loesler commented 3 months ago

@loesler please take a look on the code.

Looks good and workable. I only have a few minor suggestions but nothing is essential.

auge8472 commented 3 months ago

Looks good and workable.

Ok, thank you so far.

I only have a few minor suggestions but nothing is essential.

Please share them. Even if not essential, I want to make it as good as possible.

auge8472 commented 3 months ago

Thank you for your input nevertheless. :+1: