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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php