A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: MySQL, command similar to 'describe' but different in that...

  1. #1
    Senior Member
    Join Date
    Mar 2000
    Posts
    584
    I'm looking for a MySQL command that is similar to 'describe' but different in that it outputs the code necessary for the creation of the table. Does such a command exist?

    For instance, 'describe links;' produces:

    Code:
    +-------------+--------------+------+-----+---------+----------------+
    
    | Field       | Type         | Null | Key | Default | Extra          |
    
    +-------------+--------------+------+-----+---------+----------------+
    
    | link_id     | int(11)      |      | PRI | NULL    | auto_increment |
    etc....
    Is there any command that would produce

    create table links (link_id int(11) auto_increment primary key, etc.)

    In phpmyadmin, they have an interface that does it, but I'm wondering if it's the php that's making up the create statements based on the data it gathers from 'describe' or if there is a command that outputs the text necessary for the creation of the table.


  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    309
    using phpmyadmin, you can select 'view dump' to get a text file of mysql table structure - an option exists also for getting/backup data as a text file


  3. #3
    Senior Member
    Join Date
    Mar 2000
    Posts
    584
    Originally posted by BIG jolt
    using phpmyadmin, you can select 'view dump' to get a text file of mysql table structure - an option exists also for getting/backup data as a text file

    "In phpmyadmin, they have an interface that does it, but I'm wondering if it's the php that's making up the create statements based on the data it gathers from 'describe' or if there is a command that outputs the text necessary for the creation of the table."

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Posts
    309
    its php using mysql commands - see tbl_dump.php in phpmyadmin

    cheers
    henry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center