Пожалуйста срочно помогите ! Не могу исправить ошибку
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 'unsigned DEFAULT NULL, `Date birthday` VARCHAR(40) DEFAULT NULL, `Vozrast` DE' at line 4 query: CREATE TABLE ankets ( `nomer` INT unsigned NOT NULL auto_increment, `F.I.O.` VARCHAR(128) NOT NULL, `Sex` VARCHAR(30) unsigned DEFAULT NULL, `Date birthday` VARCHAR(40) DEFAULT NULL, `Vozrast` DEFAULT NULL, `gragdanstvo` VARCHAR(100) DEFAULT NULL, `addres` VARCHAR(200) DEFAULT NULL, `phone` VARCHAR(30) DEFAULT NULL, `orazovna` VARCHAR(100) DEFAULT NULL, `school` VARCHAR(100) DEFAULT NULL, `Specialest qualification` VARCHAR(150) DEFAULT NULL, `Main profession (specificnosti),qualification,position` VARCHAR(300) DEFAULT NULL, `additional profession (specificnosti),qualification,position` VARCHAR(300) DEFAULT NULL, `Knowledge of foreign languages(indicate)` VARCHAR(150) DEFAULT NULL, `The ability to polzovatsa PC` VARCHAR(100) DEFAULT NULL, `The presence of the driving udostovereno (specify kategoriju)` VARCHAR(100) DEFAULT NULL, `The conditions of the last place of work` TEXT(600) NOT NULL, PRIMARY KEY (nomer) ) /*!40100 DEFAULT CHARACTER SET utf8 */ in Z:\home\localhost\www\Drupal\includes\database.inc on line 550.
А вот и файл .install
<?php /*** * Реализация hook_schema() * Описание таблицы `anketa`. ***/ function anketa_schema() { $schema = array(); $schema['ankets']=array( 'fields' => array( 'nomer' => array( 'description' => 'ID', 'type' => 'serial', 'unsigned' => true, 'not null' => true, ), 'F.I.O.' => array( 'type' => 'varchar', 'not null' => true, 'length' => '128', ), 'Sex' => array( 'type' => 'varchar', 'unsigned' => true, 'not null' => false, 'length' => '30', ), 'Date birthday' => array( 'type' => 'varchar', 'not null' => false, 'length' => '40', ), 'Vozrast' => array( 'type' => 'integer', 'not null' => false, ), 'gragdanstvo' => array( 'type' => 'varchar', 'not null' => false, 'length' => '100', ), 'addres' => array( 'type' => 'varchar', 'not null' => false, 'length' => '200', ), 'phone' => array( 'type' => 'varchar', 'not null' => false, 'length' => '30', ), 'orazovna' => array( 'type' => 'varchar', 'not null' => false, 'length' => '100', ), 'school' => array( 'type' => 'varchar', 'not null' => false, 'length' => '100', ), 'Specialest qualification' => array( 'type' => 'varchar', 'not null' => false, 'length' => '150', ), 'Main profession (specificnosti),qualification,position' => array( 'type' => 'varchar', 'not null' => false, 'length' => '300', ), 'additional profession (specificnosti),qualification,position' => array( 'type' => 'varchar', 'not null' => false, 'length' => '300', ), 'Knowledge of foreign languages(indicate)' => array( 'type' => 'varchar', 'not null' => false, 'length' => '150', ), 'The ability to polzovatsa PC' => array( 'type' => 'varchar', 'not null' => false, 'length' => '100', ), 'The presence of the driving udostovereno (specify kategoriju)' => array( 'type' => 'varchar', 'not null' => false, 'length' => '100', ), 'The conditions of the last place of work' => array( 'type' => 'text', 'not null' => true, 'length' => '600', ), ), 'primary key' => array ('nomer'), ); return $schema; }; /** * Реализация hook_install() * Создание таблицы `ankets` при первом включении модуля */ function anketa_install() { drupal_install_schema('anketa'); } function anketa_uninstall() { drupal_uninstall_schema('anketa'); } ?>
Я ппервый раз разробатываю модуль !
Прошу помочь чайнику !!))
Может быть varchar не может быть unsigned.
https://api.drupal.org/api/drupal/includes!database!schema.inc/group/schemaapi/7