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!

Search results for query: *

  1. GunJack

    Automatically updating status

    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...
  2. GunJack

    Retrieving record ID after insert

    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
  3. GunJack

    Retrieving record ID after insert

    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
  4. GunJack

    Are random queries bad?

    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...
  5. GunJack

    Retrieving record ID after insert

    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...
  6. GunJack

    ascii chars

    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...
  7. GunJack

    CFIF statement help

    Just change the <cfif> statements like this. <cfif listfind(#query1.codes#,&quot;1&quot;)> x </cfif> <cfif listfind(#query1.codes#,&quot;2&quot;)> z </cfif> <cfif listfind(#query1.codes#,&quot;3&quot;)>...
  8. GunJack

    CFIF statement help

    I think this will do what you want: <cfif listfind(#query1.codes#,&quot;1&quot;)> x <cfelseif listfind(#query1.codes#,&quot;2&quot;)> z ...... .... </cfif> Hope this helps, GJ
  9. GunJack

    delete row from the query

    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
  10. GunJack

    Show files in directory based on permission level of user.

    Hey DeZiner, Would something like this do what you want? <cfdirectory name=&quot;fileList&quot; ....> <cfquery name=&quot;Perms&quot;> select files from fileTable where access_level = .... <cfoutput query=&quot;fileList&quot;> <cfif...
  11. GunJack

    CFLocation Tag Attributes

    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 &quot;/navbar.cfm&quot;> <cflocation url=&quot;login.cfm&quot;> </cfif> You could also pass a url variable to pages that shouldn't redirect to the login and check...
  12. GunJack

    Creating new pages from template

    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...
  13. GunJack

    Creating new pages from template

    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...
  14. GunJack

    CF returning extra HTML

    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...
  15. GunJack

    spaces in a field name

    Hey King, Here's some additional info that may help. <cfquery name=&quot;q1&quot; datasource=&quot;myDS&quot;> select &quot;field one&quot; from main </cfquery> <cfoutput query=&quot;q1&quot;>#q1[&quot;field one&quot;][currentrow]#<p></cfoutput> Hope this helps, GJ
  16. GunJack

    Difference of domain name registers?

    If you want to e-mail me outside of the forums, I can probably help as my company works with clients facing the same issues you're describing. GJ gunjack@atlbiz.com
  17. GunJack

    Emailing Invoices with CF 5 Question for GJ

    Hey Scott, To do what you asked about earlier, I would have your clients set up in a table with a record for each client having their e-mail address and the name of the file to attach. You can then do a query like this: <cfquery name=&quot;q1&quot; datasource=&quot;myDS&quot;> select * from...
  18. GunJack

    3 dimensial array or query in query? Not sure

    Do you have an entry in the table for each establishment? If so, I think you can do what you want like this. select * from table1 order by state asc, city asc <cfoutput query=&quot;q1&quot; group=&quot;state,city&quot;> <cfoutput> <cfset x=0> <cfoutput> <cfset x=x+1>...
  19. GunJack

    cfcontent and cache images

    I guessing here but I think it may be that Mozilla recognizes the link as dynamically generated content and intelligently caches it. I've noticed over the years that NS never caches a CF script while IE will often cache it even though it's dynamic and has changed. If this is what the problem...
  20. GunJack

    Emailing Invoices with CF 5

    I may be missing something but it seems like you just need to add a field to your database and list the file for each customer. During your e-mail loop, just specifiy the attached file as what you have stored in that customer's record. GJ

Part and Inventory Search

Back
Top