Empty data was able to be stored to the Database in CakePHP even if "Not Null" had been specified.

Posted by kwokwai on Stack Overflow See other posts from Stack Overflow or by kwokwai
Published on 2010-06-11T15:35:47Z Indexed on 2010/06/11 15:42 UTC
Read the original article Hit count: 127

Filed under:

Hi all,

I was doing some self learning on CakePHP 1.26 with Mysql 5.
I got a simple table with only one field and had applied "Not Null" to this field.
This field in the table was corresponding to a Input text box in a HTML form.
I tried not to enter anything into the Input text field, and then
I saw that empty data was able to be stored into the Table even if "Not Null" had been applied to this field.

I am confused of this result. Could you help me please?

© Stack Overflow or respective owner

Related posts about cakephp