First, execute the SHOW TABLES; query, and then you can filter by name to get all existing tables and query them one by one. Just note that is a very bad architecture and it will cause you problems in a long run.
Fetch data from multiple tables
Hello im new on laravel. And im working on a project when i need to fetch some data from many tables on laravel. Until now i can get data from one table. In fact my problem is a bit complicated and maybe i cant explain very good. So: I need to fetch data from many table
| cus_1001 |
| cus_1002 |
| cus_1003 |
| logs |
| migrations |
| oauth_access_tokens |
| oauth_auth_codes |
| oauth_clients |
| oauth_personal_access_clients |
| oauth_refresh_tokens |
password_resets |
| permission_role |
| permissions |
| role_sondazhe |
| role_user |
| roles |
| primtable |
| users
This is my mysql structure. Normally i can fetch data from primtable . I now want to get the data from the tables cus_1001, cus_1002, cus_1003. And add this to primtable. My biggest problem is that all the time these tables cus_1001 ... 1003, will change constantly and in order the numbers will be increasing to infinity (cus _ ++). Any one have an idea how can i select data from this cus _ ++ table and to send on primtable on sync?
Please or to participate in this conversation.