redarrow Posted March 30, 2008 Share Posted March 30, 2008 advance thank you........ I just created this very easy code to submit and create a temporay database table for a basket.......... i want to no how long does a temporay table last....... how does it all work ...... does it delete afther submission............ does it delete info afther submission.......... does it delete afther the next submission......... do i delete it ( but it tempory ) please help cheers....... <?php $db=mysql_connect("localhost","username","password"); $db_result=mysql_query_db("database_name",$db); if(!$db_result){ echo"DATABASE CONNECTION PROBLAM"; } if(isset($_POST['submit'])){ $sql = 'CREATE TEMPORAY TABLE `barsket` ( `id` TINYINT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT, `product` VARCHAR( 150 ) NOT NULL, `price` INT( 10 ) NOT NULL, `description` TEXT( 250 ) NOT NULL, `date_added` INT( 25 ) NOT NULL, `date_sold` INT( 25 ) NOT NULL, `confirm` CHAR( 3 ) NOT NULL, PRIMARY KEY ( `id` ))'; $sql_result=mysql_query($sql)or die(mysql_error); echo 'Creating table: \'Barsket\'....'; } ?> <form method="POST" action=""> <input type="submit" name="submit" value="CREATE TEMPORAY TABLE"> </form> Link to comment https://forums.phpfreaks.com/topic/98591-temporay-mysql-database-table-in-php-cheers/ Share on other sites More sharing options...
Barand Posted March 30, 2008 Share Posted March 30, 2008 A temporary table lasts for the duration of the connection, which is normally until the end of the current script when the connection is closed automatically Link to comment https://forums.phpfreaks.com/topic/98591-temporay-mysql-database-table-in-php-cheers/#findComment-504611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.