Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable tablenames...

Status
Not open for further replies.

wouter

Technical User
Jul 3, 2000
45
NL
Hi,<br><br>i want to make a HTML/CFML page where the user can choose where he wants to post something. The name that is chosen, will automatically be the name of the table where the stuff will be added. That means the data will be passed on to the next page where the data will be put into the table. But that means in the SQL statement, my tablename will have to be variable. How can i realise this?
 
<FONT FACE=monospace><b>&lt;cfquery name=&quot;insert&quot; datasource=&quot;mydb&quot;&gt;<br>&nbsp;&nbsp;insert into #form.table#<br>&nbsp;&nbsp;(field1,field2)<br>&nbsp;&nbsp;values<br>&nbsp;&nbsp;(#form.field1#,#form.field2#)<br>&lt;/cfquery&gt;</b></font>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top