Can you select several tables with the beginning of the same name?

Asked

Viewed 37 times

2

At the base base_suporte, there are tables with user token and support token suporte_tokenUser_tokenSup. On the general support page, you need to show all the supports, this part is finished and working.

But in the client part, what opened the support, as the tables of each support have the different end, has to make a selection of suporte_tokenUser to pick up all tables with the same user token?

Ex:

User Token is 78 and the support token is 45246, so the table name will be suporte_78_45246.

In the user panel with token 78, you need to show all tables that match the start suporte_78 or suporte_78_. Has as?

1 answer

3


Yes, it is possible to filter the table name by passing a certain term. To do this just use the query SHOW TABLES

SHOW TABLES LIKE "suporte_78%"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.