Problema con UPDATE en MySQL
Publicado: 2011-10-07 09:42 @445
Hola estoy teniendo problemas para poder actualizar la información que contiene una de las tablas de mi base de datos. Quiero poder introducir un comentario pero no sé qué pasa que no me lo inserta:
La línea 3 la he incluido por lo que pone en CPAN:
He utilizado también esto pero es que no me devuelve ningún error:
Using perl Syntax Highlighting
- my $conexion = ConectarDBrss->connect();
- $conexion->{'mysql_client_found_rows'}=1; #disable
- my $palabra = "hello";
- my $tabla = "traduc";
- my $coment = $ventanaAC->textfieldac->Text();
- eval {$conexion->do("UPDATE $tabla SET comentario=$coment WHERE palabra=$palabra")};
- if ($@) {
- printf("No se ha podido introducir\n")
- }
Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
La línea 3 la he incluido por lo que pone en CPAN:
Using text Syntax Highlighting
mysql_client_found_rows
Enables (TRUE value) or disables (FALSE value) the flag CLIENT_FOUND_ROWS while connecting to the MySQL server. This has a somewhat funny effect: Without mysql_client_found_rows, if you perform a query like
UPDATE $table SET id = 1 WHERE id = 1
then the MySQL engine will always return 0, because no rows have changed. With mysql_client_found_rows however, it will return the number of rows that have an id 1, as some people are expecting. (At least for compatibility to other engines.)
Enables (TRUE value) or disables (FALSE value) the flag CLIENT_FOUND_ROWS while connecting to the MySQL server. This has a somewhat funny effect: Without mysql_client_found_rows, if you perform a query like
UPDATE $table SET id = 1 WHERE id = 1
then the MySQL engine will always return 0, because no rows have changed. With mysql_client_found_rows however, it will return the number of rows that have an id 1, as some people are expecting. (At least for compatibility to other engines.)
Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4
He utilizado también esto pero es que no me devuelve ningún error: