gpt4 book ai didi

mysql - 想要在以下程序中应用交易,但它不起作用

转载 作者:行者123 更新时间:2023-11-29 23:21:16 24 4
gpt4 key购买 nike

DELIMITER $$

USE `g4winners2`$$

DROP PROCEDURE IF EXISTS `ebetToTbConsumer`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `ebetToTbConsumer`()
BEGIN
START TRANSACTION;
INSERT INTO g4winners2.`tb_consumer`(first_name,middle_name,last_name,username,PASSWORD ,ssn,email,home_phone
,date_of_birth,gender_type,is_locked,is_active,is_online,bonus_level_id,modified_by_entity,modified_by_id,record_created_on,record_modified_on
,consumer_status_type
,business_id,driver_license,driver_license_state_provice,mothers_maiden_name,id_type,intl_id_state_code,id_expiration,id_status,COMMENT,reward_profile_id
,player_tracking_id
)
SELECT cont.first_name, cont.middle_initial, cont.last_name,cust.user_name, cust.encrypted_password, cust.social_security_number, cont.email,cont.home_phone,cust.birthdate,
cust.sex,
b'0',b'1',b'0',1,'3',1, FROM_UNIXTIME(cust.signup_date), FROM_UNIXTIME(cust.updated_date) ,cust.status,cust.business_id,cust.drivers_license,cust.drivers_license_state_province,cust.mothers_maiden_name,cust.id_type,cust.intl_id_state_code,
cust.id_expiration,cust.id_status,cust.comment,cust.reward_profile_id,cust.player_tracking_id
FROM ebet.`contact_info` cont ,ebet.`customer` cust WHERE cust.id=cont.customer_id ;


INSERT INTO `g4winners2`.`tb_consumer_address`(consumer_id,address_line_1,address_line_2
,city,state,zip_code,country,county,region,record_modified_on,mailing_list_flag,
funding_notification_flag,title,marketing1,partner_list_flag,company_name)

SELECT cont.customer_id, cont.address1,cont.address2,cont.city,cont.state_province,cont.postal_code,cont.country,cont.county,cont.suburb ,cont.updated_date, cont.mailing_list_flag,
cont.funding_notification_flag,cont.title,cont.marketing1,cont.partner_list_flag,cont.company_name FROM ebet.`contact_info` cont;


INSERT INTO g4winners2.tb_consumer_funds(tote_account_id,pin,total_available_fund,onhold_fund,tote_account_status,last_access)
SELECT acc.acct_number,acc.encrypted_pin, FLOOR(acc.current_balance),FLOOR(acc.hold_balance), acc.status,acc.last_access
FROM ebet.`account` acc;

INSERT INTO g4winners2.`tb_system_settings`(setting_id,setting_name,setting_value,business_id )

SELECT 0,conf.name,conf.value,conf.business_id FROM ebet.`config1` conf;

COMMIT;
END$$

DELIMITER ;

最佳答案

创建过程后,您需要运行它。您是否尝试过使用运行它

调用 ebetToTbConsumer(); ?

您的表g4winners2.tb_consumer包含一些以保留字命名的字段。在表中使用 PASSWORDCOMMENT 必须 进行转义,或者完全避免使用它们。

此外,对于g4winners2.tb_system_settings.setting_id字段,请确保插入的值0,如果它不会抛出一些约束错误。如果您查看 MySQL 错误日志以真正了解出了什么问题,情况会更好。

关于mysql - 想要在以下程序中应用交易,但它不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27269006/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com