1 reply [Last post]
half_brick's picture
Offline
Joined: 02/04/2008
Juice: 82
Was this information Helpful?

Hi Guys,

I'm getting this message when I call uc_order_new:

user warning: Incorrect integer value: '' for column 'modified' at row 1 query: INSERT INTO uc_orders VALUES (6, 1, 'in_checkout', 0, 'toby@leftclick.com', '', '', '', '', '', '', '', 0, '', 0, '', '', '', '', '', '', '', 0, 0, 0, '', 1203022093, 1203022093, '') in C:\Sites\rohan.drupal5\includes\database.mysql.inc on line 172.

I'm creating come custom checkout pages (leading the customer through a couple of pages instead of the one page checkout).

The problem seems to be that in the uc_orders table definition, the last two fields are created and modified. But this INSERT statement tries to put an empty string in the last field.

The wierd thing is, I have two sites running off the same drupal install, separate databases, separate copies of uc_cart, exactly the same custom code. But on one site I get this message when creating an order, on the other I do not. Doing a describe tables command comes up looking the same on both.
UPDATE: It actually happens on both, I was running one site off an old database...

What's happening here? There's gotta be some gotcha that I'm missing...
Cheers,
Toby

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Wierd database error when creating order...

There was a bug in one release from when I added a data field to orders. The fix is to update to the latest version of Ubercart. For more info on updating, checkout the FAQ.

Better check with any contributions you're using to make sure they're still compatible.