It depends on the database your using. I'm not a database admin but I believe what you are looking for is called a "trigger". If I remember correctly, a trigger is code that is executed when a particular event happens. You could probably write a trigger to update the status when...
Thanks for the info, that's what I needed. I didn't realize you could work with the recordset object like that but that'll do what I needed. It's now working so thanks a bunch!
GJ
Unfortunately stored procs are not an option. I was hoping for a way to serialize the code execution and thought there would be a similar type of locking mechanism available in ASP as in CF.
Thanks
GJ
It sounds like a performance issue with either your host's server or possibly with MySql. From what I've read, MySql is a good database but still has limitations and is not quite ready for real production environments. If the host's server is an adequate machine, you may just be dealing with...
I need to insert a record and then retrieve the value of the autonumber field associated with the record. I can easily do this with an insert followed by a select max(id) from table1 (where id is an autonumber field). What I'm looking for is how to ensure that two inserts at the same time...
Hey Sylvano,
I think Notepad is getting confused about the extra chr(10) and possibly removing the entire sequence. On windoze, a crlf is designation by #chr(13)##chr(10)# so if you want two crlf sequences, use #chr(13)##chr(10)##chr(13)##chr(10)# instead of #chr(13)##chr(10)##chr(10)#.
I...
Just change the <cfif> statements like this.
<cfif listfind(#query1.codes#,"1")>
x
</cfif>
<cfif listfind(#query1.codes#,"2")>
z
</cfif>
<cfif listfind(#query1.codes#,"3")>...
I think this will do what you want:
<cfif listfind(#query1.codes#,"1")>
x
<cfelseif listfind(#query1.codes#,"2")>
z
......
....
</cfif>
Hope this helps,
GJ
I'm not aware of any function to remove rows. If you really needed to delete rows on the CF side, you could always create a new query and add only the rows you wanted to keep with queryAddRow(). Not a great solution but it should work.
GJ
Hey DeZiner,
Would something like this do what you want?
<cfdirectory name="fileList" ....>
<cfquery name="Perms">
select files from fileTable where access_level = ....
<cfoutput query="fileList">
<cfif...
One other option is to check the script name and load the login as long as it's not the other page.
<cfif cgi.script_name neq "/navbar.cfm">
<cflocation url="login.cfm">
</cfif>
You could also pass a url variable to pages that shouldn't redirect to the login and check...
Hey Niclas,
That line is how you would specify which course out of all the ones in your database you want to retrieve and display. The variable #url.courseID# is a URL variable and is passed to the template via the url like this:
http://domain.com/templatePage.cfm?courseID=73
In this...
Hi Niclas,
If you want to have each course with it's own webpage but sharing a common template, I would store the course info in a database and have the template pull the specific course info and display it.
If I understand your question, I think this will do what you want.
<cfquery...
Hey Duncan,
My guess is that you have an application.cfm somewhere that's inserting the unwanted code or either your webserver is somehow configured to add it. I would put an application.cfm file in the same directory as your script with just a single line
<cfset x=0>
If this solves the...
Hey King,
Here's some additional info that may help.
<cfquery name="q1" datasource="myDS">
select "field one" from main
</cfquery>
<cfoutput query="q1">#q1["field one"][currentrow]#<p></cfoutput>
Hope this helps,
GJ
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.