SMFShop > Bugs
mysql bug - either php 5 or mysql 5 problem
(1/1)
feeble:
been getting
--- Code: ---Database Error: Field 'trading' doesn't have a default value
File: D:\htdocs\Sources\shop\Shop-Buy.php
Line: 206
--- End code ---
to fix your install daniel can you consider changing:
--- Code: ---db_query("
CREATE TABLE IF NOT EXISTS {$db_prefix}shop_inventory (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`ownerid` INT UNSIGNED NOT NULL ,
`itemid` INT UNSIGNED NOT NULL ,
`amtpaid` DECIMAL(8, 2) UNSIGNED DEFAULT '0.00' NOT NULL,
`trading` TINYINT(1) UNSIGNED NOT NULL,
`tradecost` DECIMAL(8, 2) NOT NULL,
PRIMARY KEY (`id`)
)", __FILE__, __LINE__);
--- End code ---
to
--- Code: ---db_query("
CREATE TABLE IF NOT EXISTS {$db_prefix}shop_inventory (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`ownerid` INT UNSIGNED NOT NULL ,
`itemid` INT UNSIGNED NOT NULL ,
`amtpaid` DECIMAL(8, 2) UNSIGNED DEFAULT '0.00' NOT NULL,
`trading` TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL,
`tradecost` DECIMAL(8, 2) DEFAULT '0.00' NOT NULL,
PRIMARY KEY (`id`)
)", __FILE__, __LINE__);
--- End code ---
Daniel15:
Grrr... Looks like a MySQL Strict Mode problem. Strict mode is a new MySQL mode introduced with MySQL 5. Basically, it's very strict about all the little things that it never used to care about :P
I'll try fix this as soon as possible
feeble:
--- Quote from: Daniel15 on March 08, 2007, 03:54:16 pm ---Grrr... Looks like a MySQL Strict Mode problem. Strict mode is a new MySQL mode introduced with MySQL 5. Basically, it's very strict about all the little things that it never used to care about :P
I'll try fix this as soon as possible
--- End quote ---
bah
clean up your code ;)
mysql 5 is the future.
Daniel15:
--- Quote ---clean up your code
--- End quote ---
It's not my fault, most of the table creation queries were taken directly from either phpMyAdmin or mysqldump (both running under MySQL 4) ;)
I do a lot of development work on a server running PHP 5.2.1 and MySQL 5.0.32, and haven't experienced any problems - I guess strict mode is turned off in my config.
palatable:
I have this problem. It's great advice for me. Thank you.
Navigation
[0] Message Index
Go to full version