|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I meet a question. When i use PHP script to setup two temporary tables, How to use PHP to fetch the table names? For example: $result1=mysql_query("create temporary table mytable1 select * from train_time where station_name='$station1'",$id_link); $result2=mysql_query("create temporary table mytable2 select * from train_time where station_name='$station2'",$id_link); But mysql_query("select * from mytable1,mytable2 where mytable1.train_number=mytable2.train_number",$id_link); No have result!!! simple,mysql_query("select * from mytable1",$id_link); NO have result. So ,how to use the temporary table name by PHP? shan baowei |
|
#2
|
|||
|
|||
|
If you're using mySQL 3.22.x you can't use select statements to create tables. That feature was added around 3.23.x. So, which version of MySQL are you using? If it's the older version, you have to use a regular style create table statement, and then you can do an INSERT INTO your_new_table SELECT ...
|
|
#3
|
|||
|
|||
|
I using the MySQL version is 3.23.21-beta for win95/win98 on i386.But my web server's is 3.22.32 for irix6.5 on SGI and Freebsd4.0 on i386.
Of course i develop it on localhost in windows,distribute it in my servers. This question appears in windows.The version is higher than servers'. I don't know. Thanks! |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > how to use temporary tables? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|