How to work with temporary tables??

From: Date: Tue, 06 Nov 2001 22:19:58 +0000
Subject: How to work with temporary tables??
Groups: php.db 
Request: Send a blank email to php-db+get-14077@lists.php.net to get a copy of this message
Hi there, I am trying to get a result out of a couple of temporrary tables. I always get 0. Does anybody have an idea why? Cheers Andy Code: # test $stmt_1 =" CREATE TEMPORARY TABLE temp_1 SELECT * FROM $T5 WHERE country = '$parameters[1]' "; $stmt_2 =" CREATE TEMPORARY TABLE temp_2 SELECT * FROM $T5 WHERE language_1 = '$parameters[2]' or language_2 = '$parameters[2]' or language_3 = '$parameters[2]' "; if ( !($result_1 = execute_stmt($stmt_1, $link) )){ HEADER("Location:empty"); } if ( !($result_2 = execute_stmt($stmt_2, $link) )){ HEADER("Location:empty"); } $stmt =" SELECT * FROM temp_1, temp_2 "; if ( !($result = execute_stmt($stmt, $link) )){ HEADER("Location:empty"); }

« previous php.db (#14077) next »