I do have some simple validation in the model:
class Account extends AppModel {
var $name = 'Account';
var $validate = array(
'first_name' => VALID_NOT_EMPTY,
'last_name' => VALID_NOT_EMPTY
);
function beforeSave() {
uses('sanitize');
$sanitize = new Sanitize();
// Sanitize incoming data
$sanitize->clean($this->data);
}
}
My database.php is standard:
class DATABASE_CONFIG {
var $default = array( 'driver' => 'mysql',
'connect' =>
'mysql_connect',
'host' => 'localhost',
'login' => 'root',
'password' =>
'password',
'database' => 'ccmdb',
'prefix' => '');
}
I haven't retrieved data yet, as I first wanted to get the save to
work. I will add some data and do a findAll() and see what happens.
Thanks again.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---