This is my error
user warning: Column count doesn't match value count at row 1 query: INSERT INTO portfolio (nid, image_small, image) VALUES (8, 8, '', '') in /Applications/xampp/xamppfiles/htdocs/drupal/includes/database.mysql.inc on line 172.
This is my code, I am sure that the problem is either with the form api or the sql insert. Could someone give this a look over and tell me where my problem lies.
<?php
// $Id$
/**
* @file
* Provides a "joke" node type.
*/
/**
* Implementation of hook_node_info().
*/
function portfolio_node_info() {
// We return an array since a module can define multiple node types.
// We're only defining one node type, type 'joke'.
return array(
'portfolio' => array(
'name' => t('Portfolio'), // Required.
'module' => 'portfolio', // Required.
'description' => t('Add a portfolio item!'), // Required.
'has_title' => TRUE,
'title_label' => t('Title'),
'has_body' => TRUE,
'body_label' => t('Portfolio'),
'locked' => TRUE
)
);
}
/**
* Implementation of hook_menu().
*/
function portfolio_menu($may_cache) {
$items = array();
// Do not cache this menu item during the development of this module.
if (!$may_cache) {
$items[] = array(
'path' => 'node/add/portfolio',
'title' => t('Portfolio'),
'access' => user_access('create portfolio'),
);
}
return $items;
}
/**
* Implementation of hook_perm().
*/