Post by aai2on » Wed Sep 09, 2009 4:18 am

When I go to add an image for a product, I get Error No. 1364

INSERT INTO category SET parent_id = 0, sort_order='0', date_modified=NOW(), date_added=NOW()

Error is: Field 'image' doesn't have a default value.

Newbie

Posts

Joined
Wed Sep 09, 2009 3:56 am

Post by Daniel » Wed Sep 09, 2009 4:25 am

This is because your MySQL is configured to strict.

It will be fixed in the next version.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by aai2on » Wed Sep 09, 2009 4:47 am

ETA on the fixed version?

Newbie

Posts

Joined
Wed Sep 09, 2009 3:56 am

Post by Qphoria » Wed Sep 09, 2009 5:00 am

Here you go ... try this:

EDIT: system/database/mysql.php
FIND:

Code: Select all

mysql_query("SET NAMES 'utf8'", $this->connection);
mysql_query("SET CHARACTER SET utf8", $this->connection);
mysql_query("SET CHARACTER_SET_CONNECTION=utf8", $this->connection);
AFTER ADD:

Code: Select all

mysql_query("SET SQL_MODE = ''", $this->connection);

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Lestat » Thu Sep 10, 2009 10:06 pm

Thank you Qphoria. I was trying to figure out what was wrong for an hour :)

Newbie

Posts

Joined
Thu Sep 10, 2009 4:55 am

Who is online

Users browsing this forum: No registered users and 4 guests