I follow the instruction from http://www.pricetapestry.com/node/313 exactly, but my basadate is empty
i have modified the following files:
include/admin.php
{code saved}
and feeds_register_step2.php
{code saved}
Thank you in advance (and sorry for my english)
Hi,
The code changes all look fine, so it probably means that the database tabled may not have been modified correctly to have the new fields.
Did you use something like phpMyAdmin to make the changes? Based on the fields you have added, the new table SQL for your `feeds` and `products` tables would be as follows:
feeds
CREATE TABLE feeds (
id int(11) NOT NULL auto_increment,
filename varchar(255) NOT NULL default '',
registered int(11) NOT NULL default '0',
imported int(11) NOT NULL default '0',
products int(11) NOT NULL default '0',
format varchar(255) NOT NULL default '',
merchant varchar(255) NOT NULL default '',
field_name varchar(255) NOT NULL default '',
field_description varchar(255) NOT NULL default '',
field_image_url varchar(255) NOT NULL default '',
field_buy_url varchar(255) NOT NULL default '',
field_price varchar(255) NOT NULL default '',
field_category varchar(255) NOT NULL default '',
user_category varchar(255) NOT NULL default '',
field_brand varchar(255) NOT NULL default '',
user_brand varchar(255) NOT NULL default '',
field_year varchar(255) NOT NULL default '',
field_km varchar(255) NOT NULL default '',
field_fuel varchar(255) NOT NULL default '',
field_region varchar(255) NOT NULL default '',
clicks int(11) NOT NULL default '0',
PRIMARY KEY (id),
KEY merchant (merchant)
) TYPE=MyISAM;
products
CREATE TABLE products (
id int(11) NOT NULL auto_increment,
merchant varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
description text NOT NULL,
image_url varchar(255) NOT NULL default '',
buy_url text NOT NULL,
price decimal(10,2) NOT NULL default '0.00',
search_name varchar(255) NOT NULL default '',
category varchar(255) NOT NULL default '',
brand varchar(255) NOT NULL default '',
year varchar(255) NOT NULL default '',
km varchar(255) NOT NULL default '',
fuel varchar(255) NOT NULL default '',
region varchar(255) NOT NULL default '',
dupe_hash varchar(32) NOT NULL default '',
rating int(11) NOT NULL default '0',
reviews int(11) NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY dupe_filter (dupe_hash),
KEY merchant (merchant),
KEY name (name),
KEY search_name (search_name),
KEY category (category),
KEY brand (brand),
FULLTEXT KEY name_2 (name)
) TYPE=MyISAM;
..so if you have not yet modified your database, one way to do it would be to edit setup.sql and replace the feeds and products table definitions with the above code; you would then need to drop the database and install again so i'm afraid you would lose any feeds that are already registered.
Alternatively, if you have made the database changes and they look fine, it may be a reserved words issue. The way to find this out is to use the debug version of includes/database.php. Click here to download it, then unzip and upload to the /includes/ directory. Then try and register and import, and any database error will be displayed which should indicate the problem...
Hope this helps!
Cheers,
David.