Visualizzazione dei risultati da 1 a 3 su 3

Discussione: replace(mysql)

  1. #1

    replace(mysql)

    Ho provato a fare un replace su una descrizione con una funzione:

    <%
    FUNCTION fixQuotes (theString)
    if len (theString) > 0 Then
    fixQuotes = REPLACE (theString, "Aria condizionata","AC")
    else theString = rs(1)
    end if
    END FUNCTION

    funziona, ma se volessi avere altre sostituzioni posso avere una serie di replace concatenati?

    tipo:
    <%
    FUNCTION fixQuotes (theString)
    if len (theString) > 0 Then
    fixQuotes = REPLACE (theString, "Bagno","wc")
    fixQuotes = REPLACE (theString, "Bagni","wc")
    fixQuotes = REPLACE (theString, "Aria condizionata","AC")

    else theString = rs(1)
    end if
    END FUNCTION

    così sembra non funzionare, forse devo concatenare gli eventi?come?

    ciao e grazie

  2. #2
    fixQuotes = REPLACE (theString, "Bagno","wc")
    fixQuotes = REPLACE (fixQuotes , "Bagni","wc")
    fixQuotes = REPLACE (fixQuotes , "Aria condizionata","AC")

  3. #3

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.