| Welcome to Webforumz.com. |
|
Mar 20th, 2008, 23:35
|
#1 (permalink)
|
|
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 517
|
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;
__________________
Take it easy
Other Road Design
WebForumz Moderator: HTML | Javascript | PHP
|
|
|
Mar 21st, 2008, 03:00
|
#2 (permalink)
|
|
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 517
|
Re: Column count not matching, completely confuzzled
nevermind, got it fixed
__________________
Take it easy
Other Road Design
WebForumz Moderator: HTML | Javascript | PHP
|
|
|
Mar 21st, 2008, 08:14
|
#3 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
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...
__________________
|
|
|
Mar 21st, 2008, 13:14
|
#4 (permalink)
|
|
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 517
|
Re: Column count not matching, completely confuzzled
the query was generated with a PHP script I coded. It was using '' instead of NULL
__________________
Take it easy
Other Road Design
WebForumz Moderator: HTML | Javascript | PHP
|
|
|
Mar 21st, 2008, 17:32
|
#5 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: Column count not matching, completely confuzzled
OIC..
Thanks for sharing...
__________________
|
|
|
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|