Adding tables to mySQl database

From: Date: Fri, 04 Aug 2000 07:08:03 +0000
Subject: Adding tables to mySQl database
Groups: php.general 
Request: Send a blank email to php-general+get-10080@lists.php.net to get a copy of this message
Can we add new tables with the "create table" statement into an already existing database with tables? Or do we need to give some other syntax? It's not happenin at my server. The following code is executing without error - but no table is being generated. the code : <?php $db = mysql_connect("localhost","root"); mysql_select_db("mydb",$db); $sql = "Create table chat (session varchar(20), poster varchar(30), post text, time bigint(20), text_color varchar(20), id int(11) auto_increment, PRIMARY KEY(id))"; $result = mysql_query($sql); echo "Thank you! Your information has been entered.\n"; ?> Also, how can we delete a table and it's contents using a php script? T. Edison jr. ===== Rahul S. Johari (Director) ****************************************** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : abraxastech@yahoo.com Tel : 91-4546512/4522124 ******************************************* __________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/

« previous php.general (#10080) next »