Re: Fw: [PHP] Problems when I insert a record into a mysql table...
| From: | Catherine Pinatiello | Date: | Thu, 17 Oct 2002 23:14:49 +0000 |
| Subject: | Re: Fw: [PHP] Problems when I insert a record into a mysql table... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120429@lists.php.net to get a copy of this message | ||
Rick Emery wrote:
Each value which contains alpha characters must be surrounded with quotes:
$altas="INSERT INTO ordenes (orden,fecha,hora,Cliente,Contacto,domicilio,telefono) VALUES (\"$orden\",\"$fecha\",\"$hora\",\"$Cliente\",\"$Contacto\",\"$domicilio\",\"$telefono)\"";
Otherwise, mysql will reject it.Better yet: $altas = "INSERT INTO ordenes (orden,fecha,hora,Cliente,Contacto,domicilio,telefono) VALUES ('$orden','$fecha','$hora','$Cliente','$Contacto','$domicilio','$telefono')"; Good job though - I didn't catch that the first time around.