Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/02/2012, 17:41
nobo
 
Fecha de Ingreso: diciembre-2011
Mensajes: 151
Antigüedad: 12 años, 4 meses
Puntos: 1
Respuesta: Unknown column 'M' in 'where clause'

Ya ya... Pfff... Es que no sabia ni por donde empezar... A ver voy a ello...

$valorrespuesta = comprobarexistencia($_GET['recordID'],$_GET['FTalla']);

if ($valorrespuesta!=0){
$insertSQL = sprintf("UPDATE tblcarrito SET intCantidad = intCantidad +1 WHERE intContador = %s",
$_GET['intCantidad'],
$valorrespuesta);
}

else {
$insertSQL = sprintf("INSERT INTO tblcarrito (idUsuario, idProducto, intCantidad, strTalla) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_SESSION['MM_IdUsuario'], "int"),
GetSQLValueString($_GET['recordID'], "text"),
GetSQLValueString($_GET['intCantidad']),
GetSQLValueString($_GET['FTalla'], "text"));
}

Cuando intento comprar otro producto que no tenga la misma talla o no este en el carrito, ahora me aparece esto:

( ! ) Notice: Undefined index: FTalla in C:\wamp\www\zulo\carrito_add.php on line 38
Call Stack
# Time Memory Function Location
1 0.0016 395560 {main}( ) ..\carrito_add.php:0
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

mmmmmmm......... En la linea 38 hay esto:

$valorrespuesta = comprobarexistencia($_GET['recordID'],$_GET['FTalla']);

Antes de añadir esa linea, si me funcionaba todo... No entiendo porque no me esta funcionando el get... Que lo tengo asi:

Tallas: <select name="FTalla">

<?php do {
?>
<option value="<?php echo $row_ConsultaFuncion['strNombre']?>"><?php echo $row_ConsultaFuncion['strNombre']?></option>
<?php
} while ($row_ConsultaFuncion = mysql_fetch_assoc($ConsultaFuncion));
?>
</select>

No se... Anteriormente me funcionaba el get... FTalla