I am a professional software developer and graphic designer based in Rome, Italy. I am a results-driven ever-growing person. Please, see my profile and some recent work.

Articles

Subscribe to the RSS feed

CodeIgniter Database Forge class add_field function doesn’t work as expected

According to Database Forge Class CodeIgniter user guide version 1.7.2, database table fields are created via an associative array you can use as the parameter to the add_field() function. Each field definition can contain a NULL/TRUE key/value pair. Without this, the field defaults to NOT NULL.

It is not true when database driver is MySQL.

Infact, if you do not specify the NULL/TRUE key/value pair the field defaults to NULL.

Tweets

Follow me on Twitter