DragonflyCMS Projects > Storez > [solved] DEFAULT Should Be NULL in AutoNumber Field on INSER > Community Forums > Phoenix Netology
Forum Index > eCommerce > Storez

[solved] DEFAULT Should Be NULL in AutoNumber Field on INSER Reply to topic


I have downloaded Storez 9.2.3 (updated on August 4, 2008). I am using MySQL 4.0.12. I got message error from MySQL. It said that there was DUPLICATE KEY when I tried to add a new record for each table on this scripts (located at root\modules\Storez\admin):
- currencies.php,
- locations.php,
- payments.php,
- products.php,
- products_availability.php,
- products_media.php,
- products_options.php,
- products_reviews.php,
- shipping.php,
- taxes.php,
- cart.php.

I saw at "INSERT INTO ..." statement in those files. They used DEFAULT value instead of NULL. This bug happened because the value for ID field number which had field type "AutoIncrement" was: DEFAULT.

When I replace DEFAULT value with NULL value at INSERT INTO statement in those files, then the scripts work good again.

Initiated by Bugger (Original Entry) - Comments Here Please.

Please enter your server specs in your user profile! 😢


Storez Download Info wrote
Storez - a comprehensive, low server load, shopping solution, fully integrated into DragonflyCMS.
PHP 4.4.x or 5.x, MySQL 4.1.x or 5.0.x

Sorry, not a bug - use of DEFAULT is correct - I'm not prepared to revert to MySQL 4.0.x standards, especially when MySQL 6 is on its way.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Well, okay than. Rolling Eyes

I thought that there is no difference between using DEFAULT and NULL for MySQL 5 and its prior.

Now I know that NULL value does not support for MySQL 5 AutoIncrement field or the other version above version 5. Also, DEFAULT value does not support for MySQL 4.

This is a good warning for those who still using MySQL 4.x and its prior.
Anyway, keep up the good work. Thanks.

Best regards,
Masino Sinaga

Please enter your server specs in your user profile! 😢


DEFAULT is supported for MySQL 4.1.x, a well as support for character sets and collation, which mean that MySQL 4.0.x is unsuitable for DragonflyCMS.

4.1.x is also no longer supported by MySQL.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Okay, thanks again for the info.

Best regards,
Masino Sinaga

Please enter your server specs in your user profile! 😢

All times are Australia/Adelaide


Jump to: