"Access denied" when creating temporary tables

Is it possible to create temporary tables?

Can I tell you already know the answer?: https://forum.infinityfree.com/discussion/1567/views-cannot-be-created

I'd say the "access denied" error you get already tells you whether you can create such tables.

I don't know exactly why it was disabled, but, judging by the documentation, I can imagine why. I see various sandboxing problems with temporary tables which could cause security and performance issues.

Any suggestion for an alternative approach?

panchitio said:
Any suggestion for an alternative approach?
I can help you come up with an alternative way to do what you need to do. Can you please elaborate a bit on what you intended to use the temporary tables for in the first place?

I need to hold kart’s data for invoicing later, without taxing the online database. Your help is greatly appreciated.

If your goal is to not tax the database, then you should not interact with the database to begin with. The main difference between a temporary table and a regular table is that the temporary table is automatically deleted when the database connection is closed. The SELECT, INSERT, UPDATE and DELETE queries on a temporary table create just as much server load as on a regular table. Come to think of it, the temporary tables would create even more server load because new tables would have to be created and deleted every time.

So why not keep it out of the database altogether? Why not just keep the data in the PHP code? And if you need the data to persist in multiple requests (which temporary tables don't, by the way), you could use PHP Sessions for that.