salve a tutti,
dovrei aggiornare dei valori presenti in una tabella...
non conoscendo bene i comandi sono bloccato a questo codice:
solo che quando prova ad inserire i dati mi esce questo errore:codice:MySqlCommand query1 = new MySqlCommand("UPDATE `products` " + "( `name`, `category_id`, `prezzo`, `price`, `quantity`, `marca`," + "`modello`, `descrizione`, `frequenza`,`tipo`, `disponibilita`, `descrizione1`," + "`cache`, `velocita`, `socket`, `processori` , `ratio`, `instruction`," + "`lithography`, `img`) SET ( '" + Name.Text + "', '" + category.SelectedValue + "', '" + Prezzo.Text + "', '" + Prezzo.Text + "'," + "'" + Quantity.Text + "', '" + Marca.Text + "', '" + Modello.Text + "', '" + Descrizione.Text + "', '" + Frequenza.Text + "', '" + Tipo.Text + "'," + "'" + disponibile.SelectedValue + "', '" + Descrizione1.Text + "', '" + Cache.Text + "', '" + Velocita.Text + "', '" + Socket.Text + "'," + "'" + Processori.Text + "', '" + Ratio.Text + "', '" + Instruction.Text + "', '" + Lithography.Text + "','" + img.Text + "') WHERE pid=" + Request.QueryString["pid"].ToString() + "; ", connection); query1.ExecuteNonQuery();
MySql.Data.MySqlClient.MySqlException: 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 '( `name`, `category_id`, `prezzo`, `price`, `quantity`, `marca`,`modello`, `desc' at line 1
cosa sbaglio???

Rispondi quotando
