Welcome Guest, Not a member yet? Register   Sign In
can temporary tables be used in PHP?
#16

(This post was last modified: 10-01-2022, 10:22 AM by richb201.)

(09-30-2022, 01:16 AM)>>JustJohnQ Wrote: Yes, CI3 works with MS SQL Server, I am actually using it in one of my projects. You can call stored procedures in SQL Server by using an SQL query.

Thanks. The rds pricing on it seems cheaper than mysql. 

I switched all my temp tables to regular tables. I had to name each with the user's id plus a timestamp. This is for my load testing. When the user wants to exit the app, I drop all the tables that start with that user's id+timestamp. BUT, I am creating the 'prefix' in the __construct() of my controller and saving the prefix in a $_SESSION variable. 
My plan is to use the prefix+table name to DROP the garbage tables when the user logs out. But is seems that "__construct()" is running numerous times, overwriting my 'prefix'. 

What do I do about this? If I write the prefix into a cookie, the next time __construct() runs, it will overwrite the cookie. 

BTW, are you using temp tables on SQL Server? In you opinion, will  CI3 sql code that works on mysql also work on sqlserver, without changes? I have been playing with the idea of moving the report generation code to a stored procedure for a FEW YEARS. And SSMS seems pretty tooled for this. 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: can temporary tables be used in PHP? - by richb201 - 10-01-2022, 06:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB