Sergei
I think updateAll didn't sanitize data -
http://book.cakephp.org/view/75/Saving-Your-Data
or I'm wrong?
mayde it's better to set id and then save data
//Update: id is set to a numerical value
# $this->Recipe->id = 2;
# $this->Recipe->save($this->data);
but the questions is still open.
Seems that solution -is create a new component and validate data
manually.
For example
function checkIntUnsigned($var, $withZero = false)
{
//forse type set
if (is_numeric($var))
settype($var, 'int');
else
return false;
//var_dump(is_int($var));
if (is_int($var) == true)
{
if ($withZero == false)
{
if ($var > 0 )
return true;
else
return false;
}
else // with_zero = true
{
if ($var >= 0)
{
// echo "ok >=0 ";
return true;
}
}
}
return false;
}
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
To unsubscribe, reply using "remove me" as the subject.