Ver Mensaje Individual
  #11 (permalink)  
Antiguo 17/08/2010, 20:07
Avatar de aguila_393
aguila_393
 
Fecha de Ingreso: septiembre-2007
Ubicación: Argentina
Mensajes: 406
Antigüedad: 16 años, 6 meses
Puntos: 1
Respuesta: Problema al actualizar datos

Estoy viendo que capaz que sea porque las noticias que trato de actualizar tienen caracteres extraños como " , \ / , y eso. Estoy tratando de agregarle las barras con lo siguiente:
Código PHP:
Ver original
  1. $title= $_POST["title"];
  2.         $article= $_POST["article"];
  3.  
  4.         $title = mysql_real_escape_string($title);
  5.         $article = mysql_real_escape_string($article);


Pero me tira el siguiente error :
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 66

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 66

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 67

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 67

Se modifico la noticia exitosamente
UPDATE news SET title= '' , article = '' WHERE newID= 10 (Esto es la variable $query cuando trato de escapar de los caracteres extraños)

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 66

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 66

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 67


Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 67


No se pudieron agregar los valores a la base de datos 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



Ademas me llama la atencion los errores ya que tengo exactamente el mismo codigo al momento de agregar la noticia por lo que deberia funcionar bien pero no..