PANGASINAN.BIZ

Change Font Size

Change Screen

Change Layouts

Change Menu Styles

Cpanel

About Drupal!

Drupal is an open-source platform and content management system for building dynamic web sites...

Latest version

ModulesDrupal 6.15 and 5.21, maintenance releases which fix issues reported through the bug tracking system...

What's Module?

ModulesYou can also view an alphabetical list of projects that includes all projects but only their names...

What's Themes?

What's thems?Themes allow you to change the look and feel of your Drupal site...Visit JoomlArt often for new Drupal templates.

About JDTC

JDTCJoomlArt Vestibulum Nulla tellus Phasellus Integer nisl nunc odio a aliquam nibh. Ut semper dolor mus...

Hi all,

I try to insert a simple record into the Drupal's DB main schema but it does not work.

The code I post here is very simple. When the submit button is pressed, I want the record to be inserted.

function formexample_nameform_submit($form_id, $form_state) {
$table = 'Billet';
$record = new stdClass();
        $record->id = 5
$record->description = t('new_try');
drupal_write_record($table, $record);

drupal_set_message(t('done'));
}

Furthermore, field type mapping has been done during the new module's installation.

function moduleName_Billet_schema() {
$schema['Billet'] = array(
  'description' => t('description'),
  'fields' => array(
    'id' => array(
      'description' => t('id'),
      'type' => 'serial',
      'not null' => TRUE,
    ),
    'timeBillet' => array(
      'description' => t('time'),
      'type' => 'datetime',
      'not null' => FALSE,
    ),
    'description' => array(
      'description' => t('descriptions'),
      'type' => 'varchar',
      'length' => '200',
      'not null' => FALSE,
    ),
  ),
  'primary key' => array('id'),
);

return $schema;
}

The Drupal user has the required privileges.

Can you tell me what could be wrong with that ?

Thanks !

User login

Who's online

There are currently 0 users and 2 guests online.

Who's new

  • Wearbemevet
  • NudeLesbianMan
  • MalpCefe53
  • WQdorthea
  • saebabez

Latest Article

Popular Article

Latest comments

Feb 24, 2010
Feb 24, 2010
Feb 24, 2010

Support 24/7

Et pede eu platea vestibulum sit est leo nunc natoque accumsan. Felis tellus adipiscing Nullam orci consectetuer dictumst.

Vestibulum volutpat interdum eros

Contact us

Lorem vitae id orci nibh Nulla semper non pretium id elit.