I have a project where I need to modify the table names of a lot tables in my database and therefore a lot of SQL queries.
Right now my tables all have names like 1.customers, 2.customers, etc I need to update these to 1_customer, 2_customers, etc.
Is it possible, through preg_replace to replace all dots within backticks with an underscore
For example I would want
"UPDATE `1.customers` SET `value` = '1.0'"
to become
"UPDATE `1_customers` SET `value` = '1.0'"
There are approximately 50 tables in all.