I want to get the last created table name from a MySQL database using PHP.
I also used a query, but I cant to get any value. This is the query:
"select table_name from information_schema.tables where table_schema = 'databse_name' order by create_time desc limit 1"
When I am using this I get value from local system but not get value from client’s database.
What is the mistake in my query?
If I understood correctly, your query works fine on your local machine, but in the live environment it doesn’t?
Perhaps the MySQL user in the live environment has insufficient access? Try executing something like this in the live environment MySQL database:
And replace
userto the correct user name, also perhaps thelocalhostpart if you connect to a database outside localhost.