Re: PHP and multiple tables in db

by David Mintz <mambomintz(at)yahoo.com>

 Date:  Thu, 28 Sep 2000 13:41:38 -0700 (PDT)
 To:  hwg-languages(at)mail.hwg.org
  todo: View Thread, Original

--- Frani Ciesielski <franic(at)qis.net> wrote:
> Hello, Not sure if this can be done, but it would
> sure save a lot of time. I
> have 70 separate tables in a MySQL db that I need to
> add information to with
> a form. Is there a way to use a select list to say
> which table to insert the
> info into?

There sure is. You could say something like

<select name="table"><option>table1<option>table2...

and then your query is "insert into $table values
(...)" But you must really trust your users that they
know what they're doing, and if you have 70 tables you
might want to take another look at your data model
because that sounds like a lot.

David Mintz
Spanish Interpreter, US District Court
Southern District of New York
Web Design & Hosting http://dmintzweb.com/
Personal http://panix.com/~dmintz/

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA