[英]How to make properly transaction and/or lock tables in MySQL for e-shop in PHP?
[英]I can't login to my e-shop based on Prestashop 1.7. (No ps_employee table in DB.)
我在數據庫中找不到ps_employee表。
該表有可能消失了嗎? 如何創建一個新帳戶並添加新的管理員帳戶?
當然,該表本身不可能消失,無論如何,您可以將其與關聯的_shop
表一起創建:
CREATE TABLE IF NOT EXISTS `ps_employee` (
`id_employee` int(10) unsigned NOT NULL auto_increment,
`id_profile` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned NOT NULL DEFAULT '0',
`lastname` varchar(32) NOT NULL,
`firstname` varchar(32) NOT NULL,
`email` varchar(128) NOT NULL,
`passwd` varchar(60) NOT NULL,
`last_passwd_gen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`stats_date_from` date DEFAULT NULL,
`stats_date_to` date DEFAULT NULL,
`stats_compare_from` date DEFAULT NULL,
`stats_compare_to` date DEFAULT NULL,
`stats_compare_option` int(1) unsigned NOT NULL DEFAULT 1,
`preselect_date_range` varchar(32) DEFAULT NULL,
`bo_color` varchar(32) DEFAULT NULL,
`bo_theme` varchar(32) DEFAULT NULL,
`bo_css` varchar(64) DEFAULT NULL,
`default_tab` int(10) unsigned NOT NULL DEFAULT '0',
`bo_width` int(10) unsigned NOT NULL DEFAULT '0',
`bo_menu` tinyint(1) NOT NULL DEFAULT '1',
`active` tinyint(1) unsigned NOT NULL DEFAULT '0',
`optin` tinyint(1) unsigned NOT NULL DEFAULT '1',
`id_last_order` int(10) unsigned NOT NULL DEFAULT '0',
`id_last_customer_message` int(10) unsigned NOT NULL DEFAULT '0',
`id_last_customer` int(10) unsigned NOT NULL DEFAULT '0',
`last_connection_date` date DEFAULT NULL,
`reset_password_token` varchar(40) DEFAULT NULL,
`reset_password_validity` datetime DEFAULT NULL,
PRIMARY KEY (`id_employee`),
KEY `employee_login` (`email`,`passwd`),
KEY `id_employee_passwd` (`id_employee`,`passwd`),
KEY `id_profile` (`id_profile`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
CREATE TABLE IF NOT EXISTS `ps_employee_shop` (
`id_employee` INT(11) UNSIGNED NOT NULL,
`id_shop` INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (`id_employee`,`id_shop`),
KEY `id_shop` (`id_shop`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
現在只需要添加一條包含您的帳戶詳細信息的記錄,您就可以在passwd
中添加任何文本,因為您需要在admin登錄頁面中恢復密碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.