Re: Varible insert

From: Date: Thu, 05 Apr 2001 04:37:27 +0000
Subject: Re: Varible insert
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8238@lists.php.net to get a copy of this message
Hmmm...given that the form fields all had the same names - i.e. you were performing the same sql, you could use and include or "required" file that did all the DB work. Or - you could have a generic includr file function that you passed a connectstring and sqlstring to as variables.... Phil J. Shannon Doyle wrote: > Hi People, > > It seems like all I am doing lately is going into areas of php that I > haven't done before and get stuck. Anyway, here is another small request > that I have. > > I have a series of pages that must insert into a mysql database the results > of the entries. I know how to insert these details into a database, however > there are over 200 entries across 20 or so pages. What I am in need of doing > is the following: > > Is there a way of creating one insert statement that can be used by all > pages to insert the data from the fields into the appropriate fields in the > database? ie the sql insert statement is dynamic and will adapt. > > I have an idea that maybe the "get" method on the form will be of some help, > but not sure. > > Any ideas etc would be helpful. > > - Shannon > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#8238) next »