I need to extract part of a MySQL database to be in line to make it accessible through a website. To make it lighter and also for reasons of security and simplicity for the future, I have a "cleaning" of the database and transfer all the entries that do not interest me or that I do not want to leave rested in row.
To do this, I have 2 major complaints to remove entries from a table based on criteria in another table.
My database is structured as follows:
Code:
Table (field names)
Table1 (id, name, type)
Table1bis (id, info1, Info2)
Table2 (id, Email1, email2)
Table2bis (id, module, date)
The link between TableN and TableNbis is done by the ID.
The first application that I have is to remove all the entries in Table1 why info1 fields of Table1bis is empty (when I say empty, it is not 'NULL' but a field that appears white).
The second request is to delete all entries in the Table2 fields for which the module is 'Users' for example.
I did a lot of research, I saw with formulas and DELETE FROM INNER JOIN, but do not seem to work. I also saw queries with SELECT and DELETE FROM IN () but my limited programming skills do not allow me to build them correctly
What do you think would be the best option? Would someone kindly give me some examples of queries which I need?
Bookmarks