From: JohnGree on 27 Jun 2007 09:28 Hi i have a sheduled task every 60 seconds which works like this 1. finds email from my specified account 2. gets info from the body of the email 3. if email info matches info already in my database ie username password, then send SMS out. 4. insert info into records table. 5 delete email that is basicly the process. the issue i sometimes get is, if there is a problem with the insert query (very rairly but happens), then the email does not get deleted. so every 60 seconds the sms is sent out, again and again and again. so i was thinking can i do this. 1. finds email from my specified account 2. gets info from the body of the email 3. if email info matches info already in my database ie username password, insert info into records table. 4.if insert was successful then send sms and delete the email 5. if the insert was NOT successful delete email anyway. but what would be the code to find out if the insert query was successful or not? Many thanks John
From: jdeline on 27 Jun 2007 09:53 You could query the database to see if the record is there.
From: JohnGree on 27 Jun 2007 10:11 ok thanks, but what would be the query to select the last record in the table <cfquery datasource="#application.ds#"> SELECT * FROM SMS_Records WHERE ID = </cfquery>
From: [CJ] on 27 Jun 2007 10:42 [Q]what would be the query to select the last record in the table[/Q] depends on your database.
From: "JR "Bob" Dobbs" on 27 Jun 2007 11:49 See if this link helps. http://www.forta.com/blog/index.cfm/2006/12/8/Getting-RECORDCOUNT-For-INSERT-UPDATE-DELETE-Operations
|
Pages: 1 Prev: SSL Cookie Not Used - Vulnerability? Next: CFLDAP and Novell eDirectory |