Una sintassi del genere è accettabile?
codice:$sold=2; $query="UPDATE ut SET euro='euro*$sold' WHERE id=id.ut";
Una sintassi del genere è accettabile?
codice:$sold=2; $query="UPDATE ut SET euro='euro*$sold' WHERE id=id.ut";
GdR Online - http://lenar.it/
Yesterday is history. Tomorrow is mystery.
Today is a gift. That's why it's called the present
Credo di sì.
Cioé, non devo per forza fare una SELECT del campo, moltiplicarla per la variabile e poi creare l'UPDATE...ho provato ma mi sa che non gira...forse problemi con le "" e ''
GdR Online - http://lenar.it/
Yesterday is history. Tomorrow is mystery.
Today is a gift. That's why it's called the present
no, puoi fare l'operazione direttamente nell'update.
penso tu debba eliminare gli apici singoli intorno all'operazioneOriginariamente inviato da Vre
Cioé, non devo per forza fare una SELECT del campo, moltiplicarla per la variabile e poi creare l'UPDATE...ho provato ma mi sa che non gira...forse problemi con le "" e ''
SET euro=euro*$sold
"Nei prossimi tre anni col mio governo vogliamo vincere anche il cancro, che colpisce ogni anno 250.000 italiani e riguarda quasi due milioni di nostri concittadini"
Non funziona...![]()
qualche parentesi...boh, se metto un numero invece di una variabile gira bene.
GdR Online - http://lenar.it/
Yesterday is history. Tomorrow is mystery.
Today is a gift. That's why it's called the present
Funziona!!![]()
$query="UPDATE ut SET euro=(euro*$sold) WHERE id=id.ut";
GdR Online - http://lenar.it/
Yesterday is history. Tomorrow is mystery.
Today is a gift. That's why it's called the present