I created a fresh install of drupal. (6.22 version.)

Installed modules:
- Schema
- Autoadmin
- Drush

I had created a table:

CREATE TABLE IF NOT EXISTS `dms_langs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lang` varchar(4) NOT NULL,
`lang_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

I generated admin for it.

When i created a new record the lang_name field is not saved.

When i tried to update this field I have getting the following errors.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type for db_type_placeholder' at line 1 query: UPDATE dms_langs SET lang = 'asas' WHERE id = unsupported type for db_type_placeholder in D:\01_Work\Php_Dev\dms\includes\common.inc on line 3538.
Failed to update dms langs.

Have any idea how to solve it.

Thanks,

Laci.

Comments

_rune’s picture

You need the primary key in there too:

CREATE TABLE IF NOT EXISTS `dms_langs` (
`id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`lang` varchar(4) NOT NULL,
`lang_name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
_rune’s picture

Status: Active » Closed (works as designed)

Did not hear from you, closing.