Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    Non riesco ad aggiungere dati al MySql!

    Sto cercando di usare queste righe:
    codice:
    If Request.QueryString("id") <> "" Then
    id = Request.QueryString("id")
    Set rsEntrata = Server.CreateObject("ADODB.Recordset") 
    rsEntrata.Open "SELECT * FROM info WHERE id="&id&"", conn
    If not rsEntrata.EOF Then
    rfr = request.form("rfr")
    utente = rsEntrata("nome_pg")
    strsql = "INSERT INTO chat_perms ( utente, rfr ) Values('"&utente&"', "&rfr&")"
    Conn.execute strsql
    response.write rsEntrata("nome_pg") & " è stato aggiunto alla sessione di gioco."
    end If
    rsEntrata.close
    end If
    Ma continua a darmi:
    codice:
    [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    Come mai? :master:
    S W I N U B

  2. #2
    up :metallica
    S W I N U B

  3. #3
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,563
    La response.write della stringa che dice?? :quipy:

    Roby

  4. #4
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    14
    strsql = "INSERT INTO chat_perms ( utente, rfr ) Values('"&utente&"', "&rfr&" )"

    è qui l'errore... '"&rfr&"'

    Ciao

  5. #5
    codice:
    If Request.QueryString("id") <> "" Then
    id = Request.QueryString("id")
    Set rsEntrata = Server.CreateObject("ADODB.Recordset") 
    rsEntrata.Open "SELECT * FROM info WHERE id="&id&"", conn
    If not rsEntrata.EOF Then
    rfr = request.form("rfr")
    utente = rsEntrata("nome_pg")
    strsql = "INSERT INTO chat_perms ( utente, rfr ) Values('"&utente&"', "&rfr&")"
    response.write strsql:response.end 
    Conn.execute strsql
    response.write rsEntrata("nome_pg") & " è stato aggiunto alla sessione di gioco."
    end If
    rsEntrata.close
    end   If
    che ti scrive?
    Purtroppo bisogna imparare che il computer non sbaglia...fa solo quello che gli dici di fare

    www.netpolaris.it

  6. #6
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,563
    Che senso ha riesumare discussioni di due mesi e mezzo?

    Roby

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 © 2024 vBulletin Solutions, Inc. All rights reserved.