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

(This post was last modified: 09-26-2022, 07:01 PM by richb201.)

Something is wrong with CI3. I can run this from mysqlWorkBench and it runs fine. But if I run it from CI3, the table is not created.
CREATE TEMPORARY TABLE BC_PR_list_temp(
                  id INT AUTO_INCREMENT primary key NOT NULL,
                  taxyear  VARCHAR(10),
                  employee_email VARCHAR(80),
                  employee  VARCHAR(80),       
                  qualified_dollars int NOT NULL DEFAULT 0,
                  title varchar(80),
                  role varchar(80),
                  num_BC int NOT NULL DEFAULT 0,
                  num_PR int NOT NULL DEFAULT 0,
                  tipe varchar(4),
                  item varchar(80),
                  dollarsPerBC int NOT NULL DEFAULT 0,
                  dollarsPerPR int NOT NULL DEFAULT 0,
                  business_component_string varchar(120),
                  project_string varchar(120),
                  CONSTRAINT ONLYONE UNIQUE(employee_email, item, qualified_dollars)
                            )

Is there a log somewhere?

(09-26-2022, 06:15 PM)richb201 Wrote: Something is wrong with CI3 and temporary tables on RDS.

 I can run this code below from mysqlWorkBench and it runs fine. But if I run it from CI3, the table is not created.
CREATE TEMPORARY TABLE BC_PR_list_temp(
                  id INT AUTO_INCREMENT primary key NOT NULL,
                  taxyear  VARCHAR(10),
                  employee_email VARCHAR(80),
                  employee  VARCHAR(80),       
                  qualified_dollars int NOT NULL DEFAULT 0,
                  title varchar(80),
                  role varchar(80),
                  num_BC int NOT NULL DEFAULT 0,
                  num_PR int NOT NULL DEFAULT 0,
                  tipe varchar(4),
                  item varchar(80),
                  dollarsPerBC int NOT NULL DEFAULT 0,
                  dollarsPerPR int NOT NULL DEFAULT 0,
                  business_component_string varchar(120),
                  project_string varchar(120),
                  CONSTRAINT ONLYONE UNIQUE(employee_email, item, qualified_dollars)
                            )

Is there a log somewhere?
I am starting to think that the issue is due to a temp table not existing across different sessions. But what is a session in php? The code is in a few functions in my model. Is each function a different session?

How about upgrading to CI 3.1.12? How can I do that?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: can temporary tables be used in PHP? - by richb201 - 09-26-2022, 06:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB