ciao a tutti
vorrei un piacere,
nel database ci sono due tabelle
1)Utente
2)Voti
con la stessa colonna nickname
vorrei cancellare il nickname in queste due tabelle ,
come posso fare?
<%
' *** Delete Record: declare variables
if (CStr(Request("MM_delete")) = "Cancella" And CStr(Request("MM_recordId")) <> "") Then
MM_editConnection = MM_Database_STRING
MM_editTable = "Utente"
MM_editColumn = "nickname"
MM_recordId = "'" + Request.Form("MM_recordId") + "'"
MM_editRedirectUrl = "../index.asp"
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then
' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
ciao a tutti

Rispondi quotando