NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page php and phpmyadmin and a database full of tables

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-02-2003, 02:33 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer

php and phpmyadmin and a database full of tables


hey people

anyone use phpmyadmin?

u see on the left frame once you selected a database it shows links to the tables


how would i selelect them

i looked at the phpmyadmin code and its all confusing


cheers
adam_uk is offline  
Old 09-02-2003, 08:25 PM   #2 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



You can click on the table you want to work with, then up at the top you should see some links like:

[ Browse ] [ Select ] [ Insert ] [ Empty ] [ Drop ]

You can then select the field you want to work with and click one of them links and go from there to insert data, select data, etc..

Optionally you can run queries directly by typing them in the text area where it says:
????: NamePros.com http://www.namepros.com/programming/15198-php-and-phpmyadmin-database-full-tables.html

Run SQL query/queries on database DbName :

For example, if you have a table named friends and type the following in the text area:

select * from friends;

It will select everything from that table and present it in a nicely formatted table for you.
deadserious is offline  
Old 09-03-2003, 09:14 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
ahhhhhh sorry you have mis understood me


i want to create my own version (or at leaslest select the tables and then add them to a drop down box)

i know how to use phpmy admin


i just dont know how to select the names of the tables from a database in php
adam_uk is offline  
Old 09-03-2003, 02:20 PM THREAD STARTER               #4 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
ive sussed it now cheers

PHP Code:
<?

echo "<select name='adasd'>";
$dbname="contentsystem";
$result mysql_list_tables($dbname);
while(
$row mysql_fetch_row($result)){
echo
"<option value='$row[0]<br>n'>$row[0]<br>n";
????: NamePros.com http://www.namepros.com/showthread.php?t=15198
    }
mysql_free_result($result);
echo 
"</select>";
?>
this will display the tables that are in a database
adam_uk is offline  
Old 09-03-2003, 03:37 PM   #5 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Quote:
Originally posted by adam_uk
ahhhhhh sorry you have mis understood me
I don't think I misunderstood you, but rather you didn't ask your question very well. You can't just expect someone to read your mind. It's really a waste of time for others to help you when you ask questions that really say nothing about what you're actually wanting to do and they try to help you out and you come back with what you should have said in the first place. If you read your original question I think you'll see that I did in fact answer exactly what you asked. You need to put a little thought and effort into your questions.
Quote:
Originally posted by adam_uk
????: NamePros.com http://www.namepros.com/showthread.php?t=15198
i want to create my own version (or at leaslest select the tables and then add them to a drop down box)

i know how to use phpmy admin


i just dont know how to select the names of the tables from a database in php
And you see with a little thought and effort on your part you could have came up with that in the first place.

I believe I have told you this before and I'm not saying you do this intentionally or anything, but I think you should be aware of it because you do it often and I think it will help you and others that may be trying to help.
????: NamePros.com http://www.namepros.com/showthread.php?t=15198

By the way, here's my version:
PHP Code:
echo "<select name=tables size=1>n";

    
$result mysql_query("SHOW tables");
    while(
$row mysql_fetch_row($result)){
        print 
"<option>$row[0]n";
  }
echo 
"</select>n"
:beer:
deadserious is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 10:23 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger