Column count not matching, completely confuzzled

This is a discussion on "Column count not matching, completely confuzzled" within the Databases section. This forum, and the thread "Column count not matching, completely confuzzled are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 20th, 2008, 23:35
CloudedVision's Avatar
Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,272
Blog Entries: 9
Thanks: 2
Thanked 40 Times in 40 Posts
Column count not matching, completely confuzzled

I've been trying to insert a value into a table with this:

Code: Select all
INSERT INTO `page` VALUES('2','asdfasdf','0','','2','1','20080320193013','20080320193013')
But I get the following error: Incorrect integer value: '' for column 'parent' at row 1

I figured the timestamps might be messing it up, but I've tried it with one of them and none of them, still doesn't work. Any help? This is the table:


Code: Select all
DROP TABLE IF EXISTS `divaba_development`.`page`;
CREATE TABLE  `divaba_development`.`page` (
  `id` smallint(5) unsigned NOT NULL,
  `name` varchar(20) default NULL,
  `type` tinyint(4) default NULL,
  `parent` smallint(5) unsigned default NULL,
  `order` smallint(5) unsigned default NULL,
  `nav` tinyint(3) unsigned default NULL,
  `updated_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL default '0000-00-00 00:00:00',
  UNIQUE KEY `id` (`id`),
  KEY `parent` (`parent`),
  KEY `order` (`order`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 21st, 2008, 03:00
CloudedVision's Avatar
Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,272
Blog Entries: 9
Thanks: 2
Thanked 40 Times in 40 Posts
Re: Column count not matching, completely confuzzled

nevermind, got it fixed
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 21st, 2008, 08:14
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Column count not matching, completely confuzzled

Quote:
Incorrect integer value: '' for column 'parent' at row 1
What does that mean? This is what causing the error but could you share with me what did you do to correct them?
Thanks...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 21st, 2008, 13:14
CloudedVision's Avatar
Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 1,272
Blog Entries: 9
Thanks: 2
Thanked 40 Times in 40 Posts
Re: Column count not matching, completely confuzzled

the query was generated with a PHP script I coded. It was using '' instead of NULL
__________________
Web Design And Development: Other Road Design | Problems with IE6?: KApp | My Blog: Only Nerds Allowed | Learning PHP? Lessons
Last Blog Entry: Hilarious Rapper (Jul 29th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 21st, 2008, 17:32
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Column count not matching, completely confuzzled

OIC..
Thanks for sharing...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching HTML And Storing josephman1988 Other Programming Languages 0 Feb 18th, 2008 13:25
Completely Flexible Columns Geoff Myers Web Page Design 13 Oct 3rd, 2006 14:54
Find next matching record? Tim356 PHP Forum 5 Sep 20th, 2006 21:02
perl tricky pattern matching ktsirig Other Programming Languages 1 May 14th, 2006 02:33


All times are GMT. The time now is 22:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved