Post by phil-smiler » Thu May 30, 2013 10:18 pm

Hi
Firstly if there is a better place to post this please tell me.


I'm using 1.5.5.1
This happens on clean install and upgrade
But only when i add the database from the store to the new install


Right i have bought the AUCTION v2 mod and I'm having a lot of trouble, most of which the guy who made the code has been helping but i'm a little stuck on what he has said i should do in his last email.#


HE WROTE;

Yes there is missing necessary columns in database



Notice: Error: Unknown column 'auction' in 'field list';
Error: Unknown column 'p.auction' in 'where clause';


Your structure of database had to be:


CREATE TABLE IF NOT EXISTS `product` (
`product_id` int(11) NOT NULL AUTO_INCREMENT,
`model` varchar(64) NOT NULL,
`sku` varchar(64) NOT NULL,
`upc` varchar(12) NOT NULL,
`ean` varchar(14) NOT NULL,
`jan` varchar(13) NOT NULL,
`isbn` varchar(13) NOT NULL,
`mpn` varchar(64) NOT NULL,
`location` varchar(128) NOT NULL,
`quantity` int(4) NOT NULL DEFAULT '0',
`stock_status_id` int(11) NOT NULL,
`image` varchar(255) DEFAULT NULL,
`manufacturer_id` int(11) NOT NULL,
`shipping` tinyint(1) NOT NULL DEFAULT '1',
`price` decimal(15,4) NOT NULL DEFAULT '0.0000',
`points` int(8) NOT NULL DEFAULT '0',
`tax_class_id` int(11) NOT NULL,
`date_available` date NOT NULL,
`weight` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`weight_class_id` int(11) NOT NULL DEFAULT '0',
`length` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`width` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`height` decimal(15,8) NOT NULL DEFAULT '0.00000000',
`length_class_id` int(11) NOT NULL DEFAULT '0',
`subtract` tinyint(1) NOT NULL DEFAULT '1',
`minimum` int(11) NOT NULL DEFAULT '1',
`sort_order` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`viewed` int(5) NOT NULL DEFAULT '0',
`auction` enum('0','1') NOT NULL DEFAULT '0',
`date_auction` date NOT NULL,
PRIMARY KEY (`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ;




CREATE TABLE IF NOT EXISTS `product_discount` (
`product_discount_id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL,
`customer_id` int(11) NOT NULL DEFAULT '0',
`customer_group_id` int(11) NOT NULL,
`quantity` int(4) NOT NULL DEFAULT '0',
`priority` int(5) NOT NULL DEFAULT '1',
`price` decimal(15,4) NOT NULL DEFAULT '0.0000',
`date_start` date NOT NULL DEFAULT '0000-00-00',
`date_end` date NOT NULL DEFAULT '0000-00-00',
`date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`product_discount_id`),
KEY `product_id` (`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=64 ;

HE ADDED
that is the structure of product and product_discount tables if you want to work with auction system its necessary to load those two tables into your phpmyadmin ...

I thought that i needed to split the two sections of code in notepad, label the first product.sql and the second product_discount.sql then i loaded them by going into phpmyadmin using the filter to bring up product and importing and then doing the same thing for product_discount.sql but this seams to have done nothing and im still getting the same errors come up. (Shown below)

Notice: Error: Unknown column 'auction' in 'field list'
Error No: 1054
SELECT auction FROM product WHERE product_id = '230' in /home1/tetraso/public_html/auction test/system/database/mysql.php on line 50

please can some one offer so helpful advise im just thankful that i test on separate area so not to mess up the actual site :-)
:-\
Last edited by phil-smiler on Fri May 31, 2013 9:12 am, edited 1 time in total.

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by ChetanCx » Fri May 31, 2013 1:39 am

use this

Code: Select all

ALTER TABLE `product` ADD COLUMN `auction` enum('0','1') NOT NULL DEFAULT '0', ADD COLUMN `date_auction` date NOT NULL;
and

Code: Select all

ALTER TABLE `product_discount` ADD COLUMN `customer_id` int(11) NOT NULL DEFAULT '0', ADD COLUMN `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by phil-smiler » Fri May 31, 2013 3:01 am

Sorry to ask but where do i put those?

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by cwswebdesign » Fri May 31, 2013 7:28 am

phil-smiler wrote:Sorry to ask but where do i put those?
Access phpmyadmin and select your database and then click the SQL tab and past the query there. Backup your database first.

DL

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by phil-smiler » Fri May 31, 2013 9:12 am

Thats brilliant mate thanks for that, ive been scratching my head for 2 days lol

Now on to the next problem ive no doubt

Thanks again


SOLVED
[/color]
:)

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by phil-smiler » Fri May 31, 2013 9:21 am

I dont suppose that you know why im now getting this error when i try to add a new product to the site. Just get white screen and this


Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' manufacturer_id = '0', shipping = '1', price = '0.01', auction = '1', points = ' at line 1
Error No: 1064
INSERT INTO product SET model = 'Product 3', sku = '', upc = '', ean = '', jan = '', isbn = '', mpn = '', location = 'UK', quantity = '1', minimum = '1', subtract = '1', stock_status_id = '5', date_available = '2013-05-30', date_auction = '2013-06-13',, manufacturer_id = '0', shipping = '1', price = '0.01', auction = '1', points = '0', weight = '0', weight_class_id = '1', length = '0', width = '0', height = '0', length_class_id = '1', status = '1', tax_class_id = '0', sort_order = '1', date_added = NOW() in /home1/tetraso/public_html/shopping/system/database/mysql.php on line 50


The strange thing is that i can change the ones on there already (Thanks to you lol) without issue......

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by rph » Fri May 31, 2013 10:18 am

There's some issue with the mod. Contact the developer for support.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by phil-smiler » Fri May 31, 2013 10:26 am

Do you think that would be with the auction v2 mod that ive been having a problem with or one of the others, i suppose im asking if theres a way i can tell?

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by rph » Fri May 31, 2013 10:30 am

Yes, talk to the developer. No one here can help you.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by phil-smiler » Fri May 31, 2013 10:37 am

Thanks very much for your help thus far and sorry about the duplicate topics i wasn't sure if i was supposed to start a new thread as it was a different issue.

Again many thanks

Phil

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm
Who is online

Users browsing this forum: No registered users and 13 guests