Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/03/2011, 07:46
Avatar de mashter
mashter
 
Fecha de Ingreso: mayo-2008
Mensajes: 116
Antigüedad: 16 años, 11 meses
Puntos: 6
Respuesta: Error en update

otra opcion es que tengas problemas con las comillas

mira tienes esto

Código PHP:
mysql_query("UPDATE user_home SET fondo = '$fondo', info = '$info', imagen = '$perfil', imagen1 = '$imagen1', imagen2 = '$imagen2', facebook = '$facebook', twitter = '$twitter',  myspace = '$myspace', radio = '$radio', titulo-box1 = '$titulo1', box1 = '$box1', titulo-box2 = '$titulo2', box2 = '$box2',  titulo-box3 = '$titulo3', box3 = '$box3' WHERE id=2"$link) or die(mysql_error()); 
pero si la variable $fondo tiene de valor hola's la comilla sencilla (') causara mala interpretacion del query generando:

UPDATE user_home SET fondo = 'hola's', ......

lo que hay que hacer es remplazar de las variables ' por \' quedando

UPDATE user_home SET fondo = 'hola\'s', ......
__________________
- - - - - - - - -