Jump to content

Recommended Posts

Hi guys,

 

Struggling with an Insert Into... I'm sure it's something incredibly simple but I'm over-tired and it's driving me completely nuts.

 

mySQL string:

INSERT INTO workgroup_plans (title, desc, overseer, creator) VALUES ('Title','Description','27','1')

 

Table Structure:

CREATE TABLE `workgroup_plans` (
`id` int(11) NOT NULL auto_increment,
`title` text NOT NULL,
`desc` text NOT NULL,
`overseer` int(11) NOT NULL,
`creator` int(11) NOT NULL,
`timestamp` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

 

I *know* it's something simple. But my mind just can't see it.

 

 

a couple of things to think about, one maybe true the other one maybe me not thinking straight too

1. in your table structure the timestamp column is a NOT NULL and does not auto increment, therefore for an insert statement to work you must supply it a timestamp of have a default value set.

2. in your table structure the columns overseer and creater are type INT and if you use speech marks around the numbers you are inputting TEXT values, try removing the speech marks

I hope i have helped in some small way

 

Paul

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.