[英]PHP, MySQL, and temporary tables
Php novice. Php新手。
1.Is there anything wrong with this PHP & MySQL code? 1.这个PHP和MySQL代码有什么问题吗?
include_once "db_login.php" ;
$sql = "DROP TEMPORARY TABLE IF EXISTS temp_sap_id_select" ;
mysql_query ( $sql ) or ( "Error " . mysql_error () ) ;
$sql = " CREATE TEMPORARY TABLE temp_sap_id_select
(
`current_page` INT NOT NULL,
`total_pages` INT NOT NULL,
`select_date` DATE NOT NULL,
`select_schcode` CHAR(6) NOT NULL,
`select_user` CHAR(30) NOT NULL,
`select_id` CHAR(9) NOT NULL
) " ;
mysql_query ( $sql ) or ( "Error " . mysql_error () ) ;
2.Admittedly, I'm a dull boy, but I'll ask anyway: If I'm using a MySQL GUI and have open the target database, will it be aware of the above temporary table created by PHP/MySQL (IF the temporary table is properly created)? 2.不可否认,我是一个沉闷的男孩,但无论如何我会问:如果我使用MySQL GUI并打开目标数据库,它是否会知道PHP / MySQL创建的上述临时表(如果临时表是否正确创建)?
临时表仅对用于创建它们的连接可见,并且一旦连接关闭它们就会消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.