can temporary tables be used in PHP? |
https://stackoverflow.com/questions/4111...connection
Some more testing: PHP Code: $sql = "CREATE TEMPORARY TABLE BC_PR_list_temp(taxyear VARCHAR(10))"; This works fine within a function, so the temp table is created. As mentioned earlier, it will be deleted once the db session is closed. PHP Code: $this->db->table_exists('BC_PR_list_temp') table_exists() doesn't work for temporary tables, the result is always false. As a matter of fact, it is not easy to check if a temporary table exists using SQL. Conclusion: it is not a CI problem, but a MySQL limitation when working with temporary tables. I suggest you find a way to work with normal tables. |
Welcome Guest, Not a member yet? Register Sign In |