| | hello again guys!, i was wondering if there is a way to get the table names from my database using php. Well what i want to do is to get the name of the tables returned as an array or something similar... thanx in advance |
|
|
You can use an SQL command to list all of the table names in a database.
For example: CODE <?php mysql_connect(localhost,username,password); $query = "SHOW TABLES FROM database"; $tables = mysql_query($query); ?> The variable $tables will then contain all of the names of the tables. Hope this helps you.
Similar Topics
Keywords : sql php returnin tables
Hi everyone! Please help me. I'm building a group of database fro a program. the situation is like this: Looking for sql, problem, php, returnin, tables
|
|
![]() An Sql Problem In Php - returnin the name of the tables |
| ADD REPLY / Got an Opinion! | Remove these ADs! | RAPID SEARCH! | Free Web Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute more info. to help others. Ask your Doubts & Queries to get answers, So that "Together We can help others!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|