Hey , I got around 60 databases, all of them have same structure (tabled, fields and etc). I need to run 1 query to process all of them at once , query looks like this DELETE FROM tb_ad WHERE `id_c`>'15' and `id_c`<'23' How I can run this query for all databases at once ? without switching databases
I'm not aware of a way to do it with a simple query, but it can be done with php if that's a route you're willing to take.
If your user has access to the other databases you can switch databases and run the same query. USE other_database_name; DELETE FROM tb_ad WHERE `id_c`>'15' and `id_c`<'23' You would need to figure out how to logically apply this to your needs, but as long as the user has access, it should work.