CREATE question



All,

Is it possible for us to use PHP to create temp tables in our database?

Ironically, up until this point I have only needed to use SELECT statements.

But now, to speed up the processing time of a large query I would like to
create a temp table and then reference the temp table in another query.

I've tried stuff like the below:

$temp_query = "create temp table my_temp_table(
date date,
code char(3),
loc char(3),
time DATETIME HOUR TO MINUTE,
matter_id int,
name char(25)
) WITH NO LOG";

$do_query = ifx_query($temp_query, $connect_id);

But all that does is give me an "ifx_prepare fails" message.

Can we not use the ifx_query, mssql_query, mysql_query functions to create
tables?

Can they only be used to select data?



Thanks in advance,

Dan


Relevant Pages

  • Re: Update Access Table with Excel Table
    ... give you the correct data types, otherwise import the spreadsheet into a ... link that table into your "real" database. ... then turn the query into an Update query, ... the matching fields in the temp table, and referring to the temp table ...
    (comp.databases.ms-access)
  • Re: Creating a temporary table/query for subform
    ... but why can't you base your subform on a query ... BTW, when I need a temp table in a multiuser environment, I will ... is a small Access database ...
    (microsoft.public.access.queries)
  • Re: Informix vs Oracle vs DB2. SQL Query optimization.
    ... but I think you're confused because you don't know Oracle. ... the query chooses to limit TAB_A by the col_id. ... initially we have the collection as geo1. ... case of 270,000 rows in the collection, and 60,000 rows in the temp ...
    (comp.databases.informix)
  • Re: Make Table Query
    ... I have 300 users of the database; however, 10 of the users need to enter the ... Delete Query for "temp" Table. ... If you want to control the format, ...
    (microsoft.public.access.queries)
  • Re: Relationships, back end
    ... query the same, using the linked file directly rather than a temp table. ... |> into tblMovements but into a temp table, ... | adds the EquipmentID field the the temp table". ...
    (microsoft.public.access.tablesdbdesign)