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

I’m not exactly sure what you want to show them. Maybe views is what you need.

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?

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.