Brandon Jaeger Posted April 13, 2007 Share Posted April 13, 2007 Is there a way to extract all of the table information from a script? I have a fairly large script and I need to get all of the row names and stuff from it. Thanks in advance! ---brandon Link to comment https://forums.phpfreaks.com/topic/46808-extracting-table-info-from-script/ Share on other sites More sharing options...
Guest prozente Posted April 13, 2007 Share Posted April 13, 2007 The only way to get it from the script is to go through the script. If you want to get the information from the database then this is much simpler. Assuming this is MySQL you would open the mysql utility mysql -u database_username -p It will prompt you for the password, enter it and then it will connect the the MySQL daemon Then you'd select the database you want to look at Use database_name; Now you can show the tables in the database Show tables; Now that you know the table names you can look at each table, too see the different fields and the field types you can use Describe table_name; If you want to see the query used to create the table you would do Show create table table_name; Link to comment https://forums.phpfreaks.com/topic/46808-extracting-table-info-from-script/#findComment-228154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.