Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post

    Find names of every table in a DB using PHP

    Hey,

    I have a database where each username has their own table, and Im making it so that instead of a ba-zillion tables, there will be just two. But I need a way to find the names of every table in my MySQL DB. I searched google and came up empty handed. Anyone know how I can do this?
    -bubbles

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Execute the following query:

    Code:
    SHOW TABLES FROM databaseName
    MySQL manual Reference:

    http://dev.mysql.com/doc/refman/4.1/en/show-tables.html


  •  

    Posting Permissions

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