Originariamente inviato da zakros
Prendendo il codice di polinet, puoi anche ometterli cosi :


$sql = "SELECT * FROM tabella ORDER BY numero DESC LIMIT 1 ";
$result = mysql_query( $sql) or die (mysql_error());
while($riga=mysql_fetch_array($result))
{
$query= "UPDATE `sma` SET `cod_lavorazione` = '$cod_lavorazione',
`tipo` = '$tipo',
`metri` = '$metri' where id= ".$riga['id']." ";
$result2= mysql_query($query) or die (mysql_error());
}
Se metto i parametri di connessione miei mi da errore (la connessione è giusta.. è stata usata 3000 volte)..

Invece con il codice di polinet mi dice :

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 3

Cosa vuol dire???