Visualizzazione dei risultati da 1 a 2 su 2

Discussione: MMColParam

  1. #1

    MMColParam

    Ciao a tutti, è possibile fare due MMColParam, perchè se uno dipendente ha già il badge, bisogna prendere il filtro della matricola e invece se uno che non ha mai avuto il badge, prende quello numero badge. Come funziona?

    codice:
    <% if request.Form("matricola") <> "" then %>
    <%
    Dim utenti
    Dim utenti_numRows
    
    Set utenti = Server.CreateObject("ADODB.Recordset")
    utenti.ActiveConnection = MM_autentica_STRING
    utenti.Source = "SELECT * FROM dbo.utente WHERE Cogn = '" + Replace(utenti__MMColParam, "'", "''") + "'"
    utenti.CursorType = 0
    utenti.CursorLocation = 2
    utenti.LockType = 1
    utenti.Open()
    
    utenti_numRows = 0
    %>
    <%
    Dim esistente__MMColParam
    'esistente__MMColParam = "1"
    If (Request.QueryString("matricola") <> "") Then 
      esistente__MMColParam = Request.QueryString("matricola")
    End If
    %>
    <%
    Dim esistente
    Dim esistente_numRows
    
    Set esistente = Server.CreateObject("ADODB.Recordset")
    esistente.ActiveConnection = MM_autentica_STRING
    esistente.Source = "SELECT * FROM dbo.assegnatario WHERE matricola = '" + Replace(esistente__MMColParam, "'", "''") + "'"
    esistente.CursorType = 0
    esistente.CursorLocation = 2
    esistente.LockType = 1
    esistente.Open()
    
    esistente_numRows = 0
    %>
    <% else %>
    <%
    Dim badge__MMColParam
    'badge__MMColParam = "1"
    If (Request.QueryString("num_badge") <> "") Then 
      badge__MMColParam = Request.QueryString("num_badge")
    End If
    %>
    <%
    Dim badge
    Dim badge_numRows
    
    Set badge = Server.CreateObject("ADODB.Recordset")
    badge.ActiveConnection = MM_autentica_STRING
    badge.Source = "SELECT * FROM dbo.assegnatario WHERE num_badge = " + Replace(badge__MMColParam, "'", "''") + ""
    badge.CursorType = 0
    badge.CursorLocation = 2
    badge.LockType = 3
    badge.Open()
    
    badge_numRows = 0
    %>
    <%end if%>
    <%
    Dim utenti__MMColParam
    utenti__MMColParam = "1"
    If (Session("MM_Username") <> "") Then 
      utenti__MMColParam = Session("MM_Username")
    End If
    %>
    ..:: GSFLASH ::..
    HTTP://WWW.GSFLASH.IT
    MCTS - ACP - OCP - ECDL
    Ubuntu 7.10/OpenSuse 10.3/Vista Premium/MacOSX Leopard
    My authentic japanese name is 薗田Sonoda (garden field) 大河 Taiga (big river)

  2. #2
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    Incomprensibile.
    A S P : tutto il resto è noia...
    L I N U X : forse mi "converto"...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.