Re: Adding tables to mySQl database
| From: | r a n d y | Date: | Fri, 04 Aug 2000 07:37:35 +0000 |
| Subject: | Re: Adding tables to mySQl database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10087@lists.php.net to get a copy of this message | ||
Go here http://www.phpwizard.net ...download phpMyAdmin
...watch headaches
disappear.
:)
randy
______________________________________________
http://www.randys.org
http://www.iduh.com
http://www.digifont.com
For-pay Internet distributed processing.
http://www.ProcessTree.com/?sponsor=11087
> From: "Thomas Edison Jr." <thomasedisonjr@yahoo.com>
> Date: Fri, 4 Aug 2000 00:08:03 -0700 (PDT)
> To: php-general@lists.php.net
> Subject: [PHP] Adding tables to mySQl database
>
> 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/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net