RE: [PHP-DB] Re: Get MySQL table schema for a dump
| From: | Daevid Vincent | Date: | Sat, 01 Mar 2003 05:39:41 +0000 |
| Subject: | RE: [PHP-DB] Re: Get MySQL table schema for a dump | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26024@lists.php.net to get a copy of this message | ||
The wrap it in an exec() or one of the other exec type functions ;)
$result = exec("mysqldump -uMyUser -pMyPass MyDB > db_dump_file.sql");
> -----Original Message-----
> From: Jonathan Villa [mailto:jvilla@isdesigndev.com]
> Sent: Wednesday, February 26, 2003 3:36 PM
> To: php-db@lists.php.net
> Subject: RE: [PHP-DB] Re: Get MySQL table schema for a dump
>
>
> Sorry, I should have explained that I want to do this via PHP.
>
>
> ---> Jonathan
>
>
>
>
> -----Original Message-----
> From: fredridv@tva.ifi.uio.no
> [mailto:fredridv@tva.ifi.uio.no] On Behalf
> Of Fredrik de Vibe
>
> Sent: Wednesday, February 26, 2003 5:31 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Re: Get MySQL table schema for a dump
>
> jvilla@isdesigndev.com (Jonathan Villa) writes:
> > Is there was to get a database's table schema?
>
> I don't think it's called schemas in mysql, but I'm not sure :-)
>
> > So far, I have a simple function which will output
> > INSERT INTO table (x,x,x,) VALUES(x,x,x);
> > [ ... ]
> > but what I'm missing is
> > CREATE table blah, blah, blah
>
> mysqldump is the tool you need.
>
> e.g.
> $ mysqldump -u user [-p] Database > db_dump_file.sql
>
> man mysqldump for more info.
>
>
> --
> --Fredrik
> If God is dead, who will save the Queen?
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>