我必须创建临时表。我收到此错误“表'db1104107.temp'不存在”

时间:2014-01-03 23:39:43

标签: php

$query_createTemporaryTable = "
  CREATE TEMPORARY TABLE  `temporary2`(
    temporary_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    ArtistName VARCHAR( 20 ) , NAMEOfTheDVD VARCHAR( 30 )
  )Engine = InnoDB
"; 

我在PHPmyadmin中使用了这些命令并且它正常工作。它只是不用PHP代码

$result_createtemptable = mysql_query($query_createTemporaryTable ); 

$query_insertintotable = "INSERT INTO temporary2 ( ArtistName, NAMEOfTheDVD) VALUES ( 'R', 'SHAWooSHANK')"; 

$result_insertintotable = mysql_query($query_insertintotable ) or die(mysql_error()); 

$query_selecttemptable = "SELECT ArtistName,NAMEOfTheDVD FROM temporary2"; 

$result_selecttemptable = mysql_query( $query_selecttemptable) or die(mysql_error()); 

while($row_selecttemptable = mysql_fetch_array($result_selecttemptable)){ 
      echo $row_selecttemptable(`ArtistName`, `NAMEOfTheDVD'); 

  } 


  mysql_close();

?>

这里

0 个答案:

没有答案