techlab / codeigniter-smartgrid

A simple PHP datagrid control for CodeIgniter framework with Bootstrap

Home Page:http://techlaboratory.net/smartgrid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enum with booleans not working correctly

Shenzu90 opened this issue · comments

Hello everyone,

I have a problem regarding boolean values. In my Table I have multiple boolean(tinyint) fields with either 0 or 1.

For the presentation in my DataGrid I use an enum-type like this:
[cut] "type"=>"enum", "source"=>$boollist [cut]

the enum is declared as follows:
$boollist = array(0=>"No", 1=>"Yes")

Fields that hold the value 1 are "converted" correctly, fields with value 0 are not. For testing purposes I changed all 0 to 3 (both in DB and in the enum) which is working so it looks like the index 0 somehow doesn't work correctly.

Thank you in advance.

Kind regards,
Shenzu