October 16th, 2000, 11:25 PM
I meet a question.
When i use PHP script to setup two temporary tables,
How to use PHP to fetch the table names?
$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);
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?
October 17th, 2000, 12:06 PM
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 ...
October 17th, 2000, 08:46 PM
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.