I gave a field type Enum('Y','N')
Heidi gives me checkbox in Edit GridView, checked when 'Y', unchecked when 'N'.
Not a problem perse but if unchecked it will not default to 'N'.
Edit GridView this field I expect to be a dropdown listbox with the values to choose from.
Am I wrong?
Walter
Enum fields, as checkboxes not Listbox
I'm not sure if I understood your question correctly. Anyway, ENUMs with 'Y','N' set are interpreted as what we could call a boolean column. In MySQL there's no support for real boolean field-types as in some other DBMS, therefore many users use ENUM instead.
You are correct.
Question merely comes down to, HeidiSQL representing ENUM('Y','N') as checkboxes where 'others' represent as listbox giving the DBA the option to select value more easier.
Just a friendly comment.
Thanks
Aha, I think I just found a bug that causes me to post my previous posts.
Try this:
Using Im/Export -> Export Tables
Options set to Database:Create if Necessary, Tables: Recreate
Target Compatibility MySQL 3.23-5
Output Another Host / DB
Source is MySQL 4.1.14 FreeBSD Host
Target is Localhost, XAMPP MySQL 5.0.21
Table structure:
Source table 54 records, SubReport has 15 checked
Target has 54 record, SubReport all rows are unchecked
The same goes for 'leeg_ok'
Bug or no Bug?
Or is this a MySql version problem?
Biggest pronlem is of course: if I cannot trust Export Tables..............
Walter
Try this:
Using Im/Export -> Export Tables
Options set to Database:Create if Necessary, Tables: Recreate
Target Compatibility MySQL 3.23-5
Output Another Host / DB
Source is MySQL 4.1.14 FreeBSD Host
Target is Localhost, XAMPP MySQL 5.0.21
Table structure:
DROP TABLE IF EXISTS `qreport`;
CREATE TABLE `qreport` (
`id` mediumint(9) NOT NULL auto_increment,
`klt_id` mediumint(9) default NULL,
`next_id` mediumint(9) default NULL,
`omschrijving` varchar(80) NOT NULL default '',
`sqlstatement` text NOT NULL,
`orientatie` enum('V','H') NOT NULL default 'V',
`breaklevel` int(1) default '0',
`dlm_date` date default NULL,
`SubReport` enum('N','Y') default 'N',
`contexttype` char(3) default NULL,
`leeg_ok` enum('N','Y') NOT NULL default 'N',
`admin` char(1) default '',
`documentatie` text,
`pagebreak` enum('N','Y') NOT NULL default 'N',
PRIMARY KEY (`id`),
KEY `fk_qrt_klt_id` (`klt_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Source table 54 records, SubReport has 15 checked
Target has 54 record, SubReport all rows are unchecked
The same goes for 'leeg_ok'
Bug or no Bug?
Or is this a MySql version problem?
Biggest pronlem is of course: if I cannot trust Export Tables..............
Walter
Please login to leave a reply, or register at first.