Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/07/2012, 14:24
Avatar de juanramoncornejo
juanramoncornejo
 
Fecha de Ingreso: julio-2012
Ubicación: catemu
Mensajes: 3
Antigüedad: 11 años, 9 meses
Puntos: 0
Pregunta Column 'Nombre de herramienta' cannot be null

Estimados Amigos soy nuevo este Lugar Mi Nombre Es Juan Cornejo estoy desarollando un sistema en php el cual tengo un error y no he podido solucionar uds me pueden ayudar desde muchas gracias
Este es el error me sale cuando doy en insertar Registro en el servidor local que tengo en mi pc no tengo problemas , lo he subido a mi hosting y me dio este error

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/acorltda/public_html/sistema_acor/salidaherramientas.php on line 76
Column 'Nombre de herramienta' cannot be null

Marque en rojo en donde me da el error


if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$idmaterial=$_POST["Nombre_de_material"];
$accion=mysql_query("select * from ingresomateriales where `Codigo material`='$idmaterial'");
while ($fila=mysql_fetch_array($accion)) {
$cantidad=$fila["Cantidad"];
$nombre=$fila["Nombre de material"];
}

$insertSQL = sprintf("INSERT INTO `salida de materiales` (`Nombre de material`,`Codigo material`, ubicacion, `Nombre quien retira`, cantidad, `Fecha Retiro`) VALUES (%s %s, %s, %s, %s, %s)",
GetSQLValueString($nombre, "text"),
GetSQLValueString($_POST['Nombre_de_material'], "text"),
GetSQLValueString($_POST['ubicacion'], "text"),
GetSQLValueString($_POST['Nombre_quien_retira'], "text"),
GetSQLValueString($_POST['cantidad'], "int"),
GetSQLValueString($_POST['Fecha_Retiro'], "date"));