将数据保存到另一个数据库 [英] saving data to another database
问题描述
我有一个用户可以搜索音乐会列表的数据库。
我还有一个用户可以登录的用户注册数据库。
我希望能够在音乐会列表的搜索结果中有一个链接,用于将节目信息保存到他们的个人资料中。
我一直在想这个很长很难的但我还是绿色的PHP
我以为我可以在每个音乐会列表旁边创建一个链接(保存此事件),然后将事件信息发送到一个表单,该表单会自动将其插入用户reg数据库中保存的显示列。
我甚至关闭了吗?
如果是这样,我如何将信息发送到用户reg数据库?
I have a database that users can search for concert listings.
I also have a user registration database where users can log on.
I want to be able to have a link in the search results for the concert listings to save the show information to their profile.
I have thought long and hard about this but I am still green on PHP
I thought i could create a link next to the each concert listing (SAVE THIS EVENT) and then send the event info to a form that automatically inserts it into their saved shows column in the user reg database.
Am I even close?
If so how would i send the info to the user reg database?
推荐答案
我有一个数据库,用户可以搜索音乐会列表。
我还有一个用户注册数据库,用户可以登录。
我想要能够在音乐会列表的搜索结果中有一个链接将节目信息保存到他们的个人资料中。
我一直在想这个很长很难但我仍然是绿色的PHP
我以为我可以在每个旁边创建一个链接音乐会列表(保存此事件)然后将事件信息发送到一个表格,该表格自动将其插入用户注册数据库中保存的节目列。
我甚至关闭了吗?
如果是这样,我如何将信息发送到用户reg数据库?
I have a database that users can search for concert listings.
I also have a user registration database where users can log on.
I want to be able to have a link in the search results for the concert listings to save the show information to their profile.
I have thought long and hard about this but I am still green on PHP
I thought i could create a link next to the each concert listing (SAVE THIS EVENT) and then send the event info to a form that automatically inserts it into their saved shows column in the user reg database.
Am I even close?
If so how would i send the info to the user reg database?
我会创建另一个表,包括UserID和EventID。当用户保存事件时,将其放在表中。
I would create another table, consisting of UserID and EventID. When a user saves an event, put it in the table.
我将创建另一个表,包括UserID和EventID。当用户保存事件时,将其放在表中。
I would create another table, consisting of UserID and EventID. When a user saves an event, put it in the table.
好的。谢谢
还有一个问题,
我如何将音乐会列表中的数据发送到数据库?
i认为我可以创建保存这个节目链接,然后如果他们按它然后它会调用一个函数?
将使用插入。
但我的问题是我仍然新的用PHP编码,我不知道如何将存储在变量中的数据传递给将使用insert的函数。
任何帮助都会是这样的救星!!!!
这是我到目前为止所拥有的......
okay. Thanks
one more question though,
how would I send the data from the concert listing to the database?
i was thinking that i could create the save this show link and then if they were to press it then it would call a function?
that would use insert into.
but my problem is that i am still new to coding with php, and I am not sure how to pass the data stored in the variables to a function that will use insert into.
any help would be such a life saver!!!!
here is what I have so far....
我也可以只将主键注册为变量,只需将主键保存在已保存的事件列中USER REG DB?
我希望这会节省磁盘空间,而不是再次保存所有节目信息。
also could I just register the primary Key as a variable and just save the Primary Key in the saved events column in the USER REG DB?
I am Hoping this will save disk space rather than saving all of the show information again.
这篇关于将数据保存到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!