Re: A challenge

From: Date: Thu, 04 Jul 2002 23:54:41 +0000
Subject: Re: A challenge
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20324@lists.php.net to get a copy of this message
In article <20020703202639.35597.qmail@pb1.pair.com>, jsl@brandeis.edu says... > ... At least, I found it challenging. Hopefully someone here will find this a lot easier =) > > I am developing a website wherein customers can log in, enter in the name and type of their > business (rather like the yellow pages.) I have a database of all the customers, and each table in > the database is another type of business. (For example, in the table 'Gyms' all of the > places where you can workout will be listed.) > Currently the database has no tables in it. When a new type of business registers, then the > table is created. In order to prevent many variations of the same table from being created (I.E. > Restaurants, Cafe's, Luncheonettes etc) I have customers choose what type of business they are > from a pull down menu. > Here is the challenge: I would like my users who come to browse to see a similar pull down > menu, but I want this menu only to list those types of businesses that have registered. Essentially > I would like the pull down menu customers see to be a dynamic list of names of existing tables, > updating for each new table that is created. > As for how to do this I'm stuck. It seems that it must be php that modifies an html > form. Any suggestions?? Deeply appreciated. Thanks. > > jsl@brandeis.edu > -- Jonathan > If you are using mysql, there is a function mysql_list_tables. There may be similar functions for other db packages, or you could just do a SQL query to get the table names. SHOW TABLES[FROM db-name] -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#20324) next »