Ernesto
unread,Nov 20, 2008, 2:16:02 PM11/20/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP en Español
Hola,
el código no tiene ningún misterio (a mi parecer):
la tabla en la que se basa es
var $centrosdeportivos = array(
'id' => array('type'=>'integer', 'null' => false,
'default' => NULL, 'length' => 5, 'key' => 'primary'),
'nombre' => array('type'=>'string', 'null' => false,
'length' => 100),
'direccion' => array('type'=>'string', 'null' => true,
'length' => 500),
'url_google' => array('type'=>'string', 'null' => true,
'length' => 500),
'telefono' => array('type'=>'string', 'null' => true,
'length' => 15),
'created' => array('type'=>'datetime', 'null' => true,
'default' => NULL),
'modified' => array('type'=>'datetime', 'null' => true,
'default' => NULL),
'indexes' => array('PRIMARY' => array('column' => 'id',
'unique' => 1)),
'cancha_count' => array('type'=>'integer', 'null' =>
false, 'default' => 0 )
y la creación de formulario dentro del view edit es
<?php echo $form->create('Centrosdeportivo');?>
<?php
echo $form->input('id');
echo $form->input('nombre');
echo $form->input('direccion');
echo $form->input('url_google');
echo $form->input('telefono');
?>
<?php echo $form->end('Save');?>
Si por ejemplo guardo algún caracter como "º" o cualquier vocal con
tilde "á" en la BBDD queda bien reflejado, incluso si le hago un echo
con una clausula del tipo
echo $this->data["Centrosdeportivo"]["direccion"] . "<br />";
se dibuja bien pero al hacerlo en el input va mal, no se refleja en el
value de dicho input.
¿os suena cual puede ser la causa y la solución?
Gracias,
Ernesto.