Re: [PHP] CREATE question



AFAIK, the query commands just pass the query to the DB engine. The DB
decides whether or not to execute. You need special permissions in
mssql and mysql to create things. I don't know about informix.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Dan Shirah wrote:
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: 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: 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)
  • Re: Multi column update
    ... The example I've given is a sort of simplified version of my query, ... limited by how fast the server is able to write the redo information. ... temp table, and then reference that temp table with your update query: ... will be written to the trace file. ...
    (comp.databases.oracle.misc)
  • Re: Writing a query using VBA - Variable where clause
    ... that collection and set its member to true for member items IN the "temp" ... 2- Make an ad hoc query from a string. ...
    (microsoft.public.access.queries)
  • Re: Truncation Issue w/ Strings
    ... I was getting the results from an access query, so I ended up having to ... create a temp table, and insert the rows into a memo field in the temp ... "fdhsjak hfdjksh fdshfjkdlsh fjdshfj hdslfh dshfjlshjfhdsjflhdsjlfh ... dsjlkhfjdshfjdha jfdhj f " & _ ...
    (microsoft.public.vb.general.discussion)