Ver Mensaje Individual
  #8 (permalink)  
Antiguo 07/09/2010, 12:25
Avatar de Ciberdanny
Ciberdanny
 
Fecha de Ingreso: marzo-2005
Ubicación: Distrito Federal
Mensajes: 208
Antigüedad: 19 años, 10 meses
Puntos: 1
Respuesta: Problema con Insert

hola. ok, entiendo muchas gracias....

Pues.... bueno tengo que comentar que son más los campos que estoy insertando, pero para resumir no los puse todos; aunque veo que será necesario, ahi van; ya con lo que me recomiendas quedo mi codigo si:

<?
mysql_connect("localhost","admin","PWWW");
mysql_select_db("bdd");
$fentrega =$_POST['fentrega'];
$cpago =$_POST['cpago'];
$area =$_POST['area'];
$f =$_POST['f'];
$cfinal =$_POST['cfinal'];
$tentrega =$_POST['tentrega'];
$lugar =$_POST['lugar'];
$part1 =$_POST['p1'];
$descr1 =$_POST['d1'];
$cant1 =$_POST['c1'];
$pmax1 =$_POST['pm1'];
$tot1 =$_POST['t1'];
$part2 =$_POST['p2'];
$descr2 =$_POST['d2'];
$cant2 =$_POST['c2'];
$pmax2 =$_POST['pm2'];
$tot2 =$_POST['t2'];
$part3 =$_POST['p3'];
$descr3 =$_POST['d3'];
$cant3 =$_POST['c3'];
$pmax3 =$_POST['pm3'];
$tot3 =$_POST['t3'];
$part4 =$_POST['p4'];
$descr4 =$_POST['d4'];
$cant4 =$_POST['c4'];
$pmax4 =$_POST['pm4'];
$tot4 =$_POST['t4'];
$part5 =$_POST['p5'];
$descr5 =$_POST['d5'];
$cant5 =$_POST['c5'];
$pmax5 =$_POST['pm5'];
$tot5 =$_POST['t5'];
$part6 =$_POST['p6'];
$descr6 =$_POST['d6'];
$cant6 =$_POST['c6'];
$pmax6 =$_POST['pm6'];
$tot6 =$_POST['t6'];
$part7 =$_POST['p7'];
$descr7 =$_POST['d7'];
$cant7 =$_POST['c7'];
$pmax7 =$_POST['pm7'];
$tot7 =$_POST['t7'];
$part8 =$_POST['p8'];
$descr8 =$_POST['d8'];
$cant8 =$_POST['c8'];
$pmax8 =$_POST['pm8'];
$tot8 =$_POST['t8'];
$part9 =$_POST['p9'];
$descr9 =$_POST['d9'];
$cant9 =$_POST['c9'];
$pmax9 =$_POST['pm9'];
$tot9 =$_POST['t9'];
$part10 =$_POST['p10'];
$descr10 =$_POST['d10'];
$cant10 =$_POST['c10'];
$pmax10 =$_POST['pm10'];
$tot10 =$_POST['t10'];
$mon =$_POST['mon'];
$total =$_POST['tt'];
$obs =$_POST['obs'];
$sol =$_POST['sol'];
$vobo =$_POST['vobo'];
$aut =$_POST['aut'];
$id =$_POST['id'];
mysql_query ("update int_rocompra set fentrega='$fentrega', cpago='$cpago', area='$area', fecha='$fecha', cfinal='$cfinal', lugar='$lugar', part1='$part1', descr1='$descr1', cant1='$cant1', pmax1='$pmax1', tot1='$tot1', part2='$part2', descr2='$descr2', cant2='$cant2', pmax2='$pmax2', tot2='$tot2', part3='$part3', descr3='$descr3', cant3='$cant3', pmax3='$pmax3', tot3='$tot3', part4='$part4', descr4='$descr4', cant4='$cant4', pmax4='$pmax4', tot4='$tot4', part5='$part5', descr5='$descr5', cant5='$cant5', pmax5='$pmax5', tot5='$tot5', part6='$part6', descr6='$descr6', cant6='$cant6', pmax6='$pmax6', tot6='$tot6', part7='$part7', descr7='$descr7', cant7='$cant7', pmax7='$pmax7', tot7='$tot7', part8='$part8', descr8='$descr8', cant8='$cant8', pmax8='$pmax8', tot8='$tot8', part9='$part9', descr9='$descr9', cant9='$cant9', pmax9='$pmax9', tot9='$tot9', part10='$part10', descr10='$descr10', cant10='$cant10', pmax10='$pmax10', tot10='$tot10', mon=$mon', total='$total', obs='$obs', sol='$sol', vobo='$vobo', aut='$aut' where id=$id") or die(mysql_error());
?>


Y me da este error:

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 '', total='400', obs='asdasdsadas', sol='Romero Marcelo Jose', vobo='Zapata Carde' at line 1


Los datos que aqui aparecen en lugar de las variables son los que estoy mandando con el formulario.

muchas gracias por la ayuda...
__________________
www.eris.com.mx