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 SkipVought 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
0
0
NL
Hi,<br><br>i couldn't find a forum about cold fusion, so i'm posting my question here.<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?<br><br>I you aren't familiar with cold fusion, can you tell me if this is possible in another way?<br><br>Thx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wouter
 
I do not know anything about cold fusion, however I do know that if you are using unix then you can embed the sql into a shell script and pass the table name to the sql from the shell as a varaible.<br>For example: -<br><br>#! /bin/ksh<br>export TABLE=$1<br>sql databasename &lt;&lt; EOF &gt;&gt; log.file<br>inset into $TABLE<br>select * from&nbsp;&nbsp;etc.....<br>EOF<br><br><br><br>&nbsp; <p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top