1.5.8a Missing customer_groups field in DB
New install , 1.5.8a DB miss customers_groups entry in DB
PHP Fatal error: 1146:Table 'xxx.customer_groups' doesn't exist :: SELECT count(*) as total FROM (SELECT cg.*, count(ctg.customer_id) as customer_count FROM customer_groups cg LEFT JOIN customers_to_groups ctg USING (group_id) GROUP BY cg.group_id ORDER BY group_name, group_id) countresults ==> (as called by) /xxxxxxxxxxxxx/includes/classes/split_page_results.php on line 220 <== in /includes/classes/db/mysql/query_factory.php on line 667.
Anyone can bring me a mysql code to add this to my BD plz ??
Look like the installation has missed to add customer_groups fields in DB...
Can't change an email on a customer because of that, page stuck at group and give ;
------
Customer Groups
WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data.
---------
thank you..
Re: 1.5.8a Missing customer_groups field in DB
Can't repro, no idea how this happened. You can find the SQL for creating the customer_groups table in mysql_zencart.sql in zc_install/sql/install.
Re: 1.5.8a Missing customer_groups field in DB
will look into it, thank you
btw, I do have installed another instance to try and same problem... look like this table are not created..
Ok thank you ..
Re: 1.5.8a Missing customer_groups field in DB
Quote:
Originally Posted by
swguy
Can't repro, no idea how this happened. You can find the SQL for creating the customer_groups table in mysql_zencart.sql in zc_install/sql/install.
I tryed to do manualy in phpmyadmin got this whit the code found on the .sql ;
CREATE TABLE customer_groups (
group_id int UNSIGNED NOT NULL AUTO_INCREMENT,
group_name varchar(191) NOT NULL,
group_comment varchar(255),
date_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (group_id),
UNIQUE KEY idx_groupname_zen (group_name)
);
MySQL said: Documentation
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Re: 1.5.8a Missing customer_groups field in DB
Quote:
Originally Posted by
swguy
Can't repro, no idea how this happened. You can find the SQL for creating the customer_groups table in mysql_zencart.sql in zc_install/sql/install.
I just see that same problem whit customers_to_groups, was not created as well in the db...
# Table structure for table customers_to_groups
#
CREATE TABLE customers_to_groups (
id int UNSIGNED NOT NULL AUTO_INCREMENT,
group_id int UNSIGNED NOT NULL,
customer_id int UNSIGNED NOT NULL,
date_added timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
UNIQUE KEY idx_custid_groupid_zen (customer_id, group_id),
KEY idx_groupid_custid_zen (group_id, customer_id)
);
Re: 1.5.8a Missing customer_groups field in DB
What version of MySQL is being run? If you go to the site's admin's Tools :: Server/Version Info, that tool will tell you/
Re: 1.5.8a Missing customer_groups field in DB
Quote:
Originally Posted by
lat9
What version of MySQL is being run? If you go to the site's admin's Tools :: Server/Version Info, that tool will tell you/
MySQL 5.5.68-MariaDB
Re: 1.5.8a Missing customer_groups field in DB
Quote:
Originally Posted by
emmqc
MySQL 5.5.68-MariaDB
you will need to upgrade your mysql version.
see this stackoverflow post.
Re: 1.5.8a Missing customer_groups field in DB
Yep. Zen Cart v1.5.8 requires MySQL 5.7.8+ or MariaDB 10.2.7+ (where “+” means “or newer”)
https://docs.zen-cart.com/user/first...#mysql-version
Re: 1.5.8a Missing customer_groups field in DB