Error when "POSTing" to another page

5 posts by 3 authors in: Forums > CMS Builder
Last Post: September 10, 2010   (RSS)

Hi all,

I'm getting the following error when I "POST" to another page:

Error: Field 'createdDate' doesn't have a default value

I'm not quite sure what this is but it does not show up when using mySQL v4.x but does when using mySQL v5.x

Any idea what causes this? I've tried narrowing it down but it's kind of hard when that's the only thing that shows up on the page.

TIA!

Eric

Re: [eduran582] Error when "POSTing" to another page

By Chris - September 9, 2010

Hi eduran582,

What page are you POSTing to? Can you please attach the complete PHP source code of the page?
All the best,
Chris

Re: [eduran582] Error when "POSTing" to another page

By Jason - September 10, 2010

Hi Eric,

You just need to add a value for the field createdBy when you're creating a record. You can use the MySQL function NOW() as a value to put in the current timestamp as a value.

Give that a try. If you're still running into trouble, please attach add_Current.php to this thread and I can take a closer look at it for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Error when "POSTing" to another page

Hi Jason,

That did the trick! In this case, I actually had to do that (enter some default values) for all those fields in the table where we cannot enter a value (createdDate, createdByUserNum, updatedDate, updatedByUserNum, dragSortOrder). When I 'call' this page from other areas of the program, I don't get that error. I'm guessing it must have something to do with the "refresh" or renewing of the information on that page.

Either way, it works now. Thanks for the, as usual, fine support!

Eric