Difference between #1 and #2 of
Getting nulls from database instead of empty strings

Revision #2 has been created by samdark on May 29, 2011, 6:31:29 PM with the memo:

Corrected that actual values written aren't nulls
« previous (#1)

Changes

Title changed

SavGetting nulls tofrom database instead of empty strings

Category unchanged

Tips

Yii version unchanged

Tags unchanged

database, null

Content changed

To writeget `null` from database instead of empty strings to database when saving empty values you need to set up your DB connection as follows:


```php
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=test',
[...]
13 0
11 followers
Viewed: 20 654 times
Version: 1.1
Category: Tips
Tags: database, null
Written by: samdark
Last updated by: samdark
Created on: May 7, 2011
Last updated: 13 years ago
Update Article

Revisions

View all history