Created
July 20, 2012 15:55
-
-
Save davidsf/3151522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfquery name="en_memoria" datasource="venvir"> | |
SELECT * FROM Memoria WHERE Id_Lote = #datos_para_gateway.num_lote# AND URL_TOKEN = '#datos_para_gateway.usr_token#' | |
</cfquery> | |
<cfif #en_memoria.RecordCount# EQ 0> | |
<cfquery name="memoria" datasource="venvir"> | |
INSERT INTO Memoria (Id_Lote, URL_Token, Fecha) VALUES (#datos_para_gateway.num_lote#, '#datos_para_gateway.usr_token#', #now()#); | |
</cfquery> | |
<cfelse> | |
<cfquery name="memoria" datasource="venvir"> | |
UPDATE Memoria | |
SET Fecha = #now()# | |
WHERE Id_Lote = #datos_para_gateway.num_lote# AND URL_TOKEN = '#datos_para_gateway.usr_token#' | |
</cfquery> | |
</cfif> | |
<cfquery name="actualiza_ranking" datasource="venvir"> | |
UPDATE Lotes SET Ranking = #datos_para_gateway.nvo_rank# WHERE Id_Lote = #datos_para_gateway.num_lote# | |
</cfquery> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment