简体   繁体   中英

Can I use SELECT AS to redefine table names in MySQL+PHP?

I know a little about SELECT AS in MySQL, but I was wondering if there is a way to redefine table names for later use. For instance, I have a table named 'nb2013', but if I send my exported data to someone else (to install it on his server) he may want to change the names of the tables to what suits him, as 'nb2013' may already exist in his database.

Can I DEFINE the names in PHP so that PHP will still request the right table from MySQL?

You can use a variable as table name. In your config you can then for instance define the table name variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM