gpt4 book ai didi

php - 为什么这个查询在 PHPMyAdmin 中不起作用

转载 作者:行者123 更新时间:2023-11-29 07:32:36 25 4
gpt4 key购买 nike

我有一个查询,它在 PHPMyAdmin 中不起作用,显示一些语法错误:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 12

create table appntmnt(
appointment_id bigint unsigned not null primary key auto_increment,
user_id bigint unsigned not null,
br_id bigint unsigned,
brandname text,
brname text,
strt_time bigint unsigned,
end_time bigint unsigned,
is_cancelled boolean,
is_confirmed boolean,
app_ser text,
index appntmnt_table_index(brand_id, user_id);
foreign key foreign_key1(user_id) references user(user_id) on delete cascade,
foreign key foreign_key2(branch_id) references branch(branch_id) on delete cascade
);

如有任何帮助,我们将不胜感激。

最佳答案

这会起作用。

create table appntmnt(
appointment_id bigint unsigned not null primary key auto_increment,
user_id bigint unsigned not null,
br_id bigint unsigned,
brandname text,
brname text,
strt_time bigint unsigned,
end_time bigint unsigned,
is_cancelled boolean,
is_confirmed boolean,
app_ser text,
index appntmnt_table_index(br_id, user_id),
foreign key foreign_key1(user_id) references user(user_id) on delete cascade,
foreign key foreign_key2(br_id) references branch(branch_id) on delete cascade
);

更新了最后三行,检查一下。

关于php - 为什么这个查询在 PHPMyAdmin 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32091504/

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