Forums / All Other Contributions/Addons / MySQL Issue installing un_wishlist

MySQL Issue installing un_wishlist

Locked
Results 1 to 6 of 6
This thread is locked. New replies are disabled.
02 Nov 2007, 11:52
#1
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

MySQL Issue installing un_wishlist

I'm trying to install the "Wishlist" addon, all done, except creating mysql tables.

1146 Table 'grainspace.un_wishlists' doesn't exist
in:
[SELECT id FROM un_wishlists w WHERE w.customers_id=2 and w.default_status=1 ]


I'm using this to create the tables.
# --------------------------------------------------------
#
# Table structure for table un_wishlists
#

DROP TABLE IF EXISTS `un_wishlists`;
CREATE TABLE `un_wishlists` (
  `id` int(11) NOT NULL auto_increment,
  `customers_id` int(11) NOT NULL default '0',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `name` varchar(255) default NULL,
  `comment` varchar(255) default NULL,
  `default_status` tinyint(1) NOT NULL default '0',
  `public_status` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


# --------------------------------------------------------
#
# Table structure for table un_products_to_wishlists
#

DROP TABLE IF EXISTS `un_products_to_wishlists`;
CREATE TABLE `un_products_to_wishlists` (
  `products_id` int(11) NOT NULL default '0',
  `un_wishlists_id` int(11) NOT NULL default '0',
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  `quantity` int(2) NOT NULL default '1',
  `priority` int(1) NOT NULL default '2',
  `comment` varchar(255) default NULL,
  PRIMARY KEY  (`products_id`,`un_wishlists_id`)
) TYPE=MyISAM;


ANy help appreciated. Thanks.
02 Nov 2007, 15:18
#2
nomadrw avatar

nomadrw

Zen Follower

Join Date:
Sep 2007
Posts:
331
Plugin Contributions:
0

Re: MySQL Issue installing un_wishlist

CSS Evangelist:
Why are you placing ' ' around your fields.
you can not have two primary keys
what is TYPE=MyISAM; for?

nomad
02 Nov 2007, 15:37
#3
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: MySQL Issue installing un_wishlist

I pasted exactly the same content as in the txt that came with the zip.

Fixed it anyway, edited the prefix in un_database_tables.php and it worked.
05 Nov 2007, 20:49
#4
bspicker avatar

bspicker

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: MySQL Issue installing un_wishlist

I am getting the same error message as Nimbuz.

The readme file for the Un_Wishlist Mod states:
Important: If in your implementation of ZenCart you defined a database table prefix (see file "includes/configure.php", line 52), add that prefix to the table names in the sql file ("un_wishlist.sql", lines 9, 10, 28 and 29).

I have checked my configure.php file and found my database is using a "zen_" prefix.

When I add the prefix to the un_wishlist.sql file before using the Install SQL Patch tool, it creates double prefixes to the tables like this:
zen_zen_un_wishlists
zen_zen_un_products_to_wishlists

I have also tred modifying the un_database_tables.php as suggested by Nimbuz - that didn't work for me either.

I have also deleted and reinstalled the mod a couple of times to see if I missed something.

Does anyone have a suggestion as to what else I might try?

Thanks,
Beth
06 Nov 2007, 00:52
#5
nimbuz avatar

nimbuz

Zen Follower

Join Date:
Oct 2007
Posts:
291
Plugin Contributions:
0

Re: MySQL Issue installing un_wishlist

There're two un_database_tables.php, one for frontend and the other for backend (admin panel), edit both:

1. admin/included/extra_datafiles
2. includes/extra_datafiles

just add your prefix to "un_wishlist" and "un_products_to_wishlists" making them "prefixun_wishlsit" and "prefixun_products_to_wishlists
".

Let me know how it worked.
14 Nov 2007, 15:03
#6
bspicker avatar

bspicker

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: MySQL Issue installing un_wishlist

Sorry it has taken me so long to reply. The second table was exactly what I was missing.

THANK YOU! THANK YOU! THANK YOU!!!