[英]when we create a new record in sugar the fields will be inserted into two or more table how this can be achieved from MySQL query
当我们在sugarcrm中创建新记录时,字段将插入到两个或多个表中,如何从MySQL查询中实现
我有两个表a_vendor(id,name)和a_vendor_cstm(id_c,email_c)我需要在同一张表中插入两个表,以便具有与
insert into a_vendor (id,name) values (auto_generated,'myname');
insert into a_vendor (id_c,email_c) values (auto_generated_same_as_id,'my email');
好吧,我发现它感谢您的帮助,查询为:
START TRANSACTION;
SET @id= uuid();
INSERT INTO a_vendor(id,name) VALUES (@id,'mynqme');
INSERT INTO a_vendor_cstm(two_id, name) VALUES (@id, 'email');
COMMIT;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.