SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Automatically Create Database Table Structure and Content

    Hi All

    For the first time ever I am getting third party programmers to help update my code etc.

    They need to be able to access tables in the database but I do not want to give the access to the whole database as there is allot of information in it that they do not need.

    I really don't want to have to write code for every table for them to check.

    So my question is... does anyone have some code I can have that will select everything from a table and then automatically display it, pretty much exactly like phpMyAdmin does?

    Thanks

    mrmbarnes

  2. #2
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    I'm not exactly sure what you want to show them. Maybe views is what you need.

  3. #3
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply... I have never heard of views before and have had a look but I don't think it is quite what I am looking for.

    Selecting everything and outputting everything I can do. What I am chasing is a way to automatically output the information.

    Example:

    SELECT * FROM atable

    The some more code (this is the code I need) if it exists

    Then that would output all the fields in the table at the top and then all the content for each row pretty much exactly like phpMyAdmin does.

    Any other ideas?

  4. #4
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,215
    Mentioned
    236 Post(s)
    Tagged
    1 Thread(s)
    First, if you use PHPMyAdmin, they will have the same access to the database as if they have direct access to it. PHPMyAdmin only provides a graphic interface, it doesn't limit the access to any area of that database.

    Restricting the access to certain tables or databases is a matter of permissions and you need to setup those permissions in MySQL or any other database manager that you use. You will create an account with the appropriate permissions to access the tables you want and then you can install PHPMyAdmin or any other graphic interface if you want. They will see only those tables or databases they have access to.


Bookmarks

Posting Permissions

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