Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用于酒店详细信息的 mysql 表,其中酒店 ID 是自动生成的,并且是自动增量的,还有另一个表包详细信息,其中添加了每个酒店的包。
目前包 id 会自动递增。
所以第一家有 5 个套餐的酒店的酒店 ID 为 1,套餐 ID 为 1、2、3、4、5,第二家酒店的酒店 ID 为 2,套餐 ID 为 6、7、8、9
但我想将其设为酒店 id 1 包 id 1a、1b、1c、1d、1e 和第二家酒店,酒店 id 2 包 id 为 2a、2b、2c 等
我们正在使用 php & mysql
包表中有created_on字段吗?
如果是,则使用 created_on 字段获取最新包的详细信息并从中获取包ID,并通过php代码在需要的格式中增加,然后插入包。