<bdo id='TVZ37'></bdo><ul id='TVZ37'></ul>

  • <legend id='TVZ37'><style id='TVZ37'><dir id='TVZ37'><q id='TVZ37'></q></dir></style></legend>
    1. <tfoot id='TVZ37'></tfoot>
      <i id='TVZ37'><tr id='TVZ37'><dt id='TVZ37'><q id='TVZ37'><span id='TVZ37'><b id='TVZ37'><form id='TVZ37'><ins id='TVZ37'></ins><ul id='TVZ37'></ul><sub id='TVZ37'></sub></form><legend id='TVZ37'></legend><bdo id='TVZ37'><pre id='TVZ37'><center id='TVZ37'></center></pre></bdo></b><th id='TVZ37'></th></span></q></dt></tr></i><div id='TVZ37'><tfoot id='TVZ37'></tfoot><dl id='TVZ37'><fieldset id='TVZ37'></fieldset></dl></div>

        <small id='TVZ37'></small><noframes id='TVZ37'>

        如何使用 Drupal 发布驻留在外部数据库中的数据?

        时间:2023-06-22
          <bdo id='a1YNU'></bdo><ul id='a1YNU'></ul>

          • <small id='a1YNU'></small><noframes id='a1YNU'>

              <legend id='a1YNU'><style id='a1YNU'><dir id='a1YNU'><q id='a1YNU'></q></dir></style></legend>
                  <tbody id='a1YNU'></tbody>

                <i id='a1YNU'><tr id='a1YNU'><dt id='a1YNU'><q id='a1YNU'><span id='a1YNU'><b id='a1YNU'><form id='a1YNU'><ins id='a1YNU'></ins><ul id='a1YNU'></ul><sub id='a1YNU'></sub></form><legend id='a1YNU'></legend><bdo id='a1YNU'><pre id='a1YNU'><center id='a1YNU'></center></pre></bdo></b><th id='a1YNU'></th></span></q></dt></tr></i><div id='a1YNU'><tfoot id='a1YNU'></tfoot><dl id='a1YNU'><fieldset id='a1YNU'></fieldset></dl></div>

                1. <tfoot id='a1YNU'></tfoot>
                2. 本文介绍了如何使用 Drupal 发布驻留在外部数据库中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我对 Drupal 非常陌生,并且获得了一些关于视图的混合信息,所以我想看看是否有人可以让我走上正确的道路.

                  I'm very new to Drupal and was getting a bit of mixed information about views so I wanted to see if anyone can set me on the right path.

                  这是我的情况.我有一个单独的数据库(在同一个 Drupal 数据库服务器上),它有很多由另一个团队维护的数据.我们想将这些数据发布到网络上,在得到一些建议后,看起来 Drupal 视图是可行的方法.

                  Here's my situation. I have a separate database (on the same Drupal database server), that has a lot of data that's maintained by another team. We want to publish that data to the web and after getting some suggestions it looks like Drupal views is the way to go.

                  问题是,我不知道从哪里开始.我阅读了文档,只看了 Lullabot 上的视图教程,但我的数据根本不在字段列中.

                  The problem is, I'm not sure where to go from there. I read the documentation and just watched the views tutorial on Lullabot, but my data isn't in the fields columns at all.

                  我阅读了一份文档,其中说我必须向 Drupal描述"我的外部数据库,但不知道该怎么做.我在 drupal.org 上发现了一些工具(服务等),它们说它们可以分析我的数据库并将结构报告回 Drupal,但我无法弄清楚.

                  I read one document that said I had to "describe" my external database to Drupal but wasn't sure how to do it. I found a few tools on drupal.org (services, etc..) that said they can analyize my database and report the structure back to Drupal but I can't figure it out.

                  基本上我想要的最终结果是两件事.首先是简单地将我的外部数据库中的数据显示到 Drupal 节点上(唯一的问题是,每个页面都特定于一个数据库实体,因此尽管数据格式/显示是标准的,但数据本身会随着链接而改变,例如,www.example.com/ibm 应该只提供我们在 ibm 上的数据,随着公司名称的变化,显示的数据也会发生变化),稍后我可能想在数据显示之前对数据进行一些计算.

                  Basically the end result I want is two things. First is to simply display the data as is from my external database onto a Drupal node (the only catch is, each page is specific to a database entity so although the data format/display is standard, the data itself will change with the links, for exmaple, www.example.com/ibm should only provide our data on ibm and as the company name changes so does the data that's displayed) and later I might want to run some calculations on the data before it shows up.

                  有人对如何执行此操作或任何教程有任何建议吗?

                  Anyone have any suggestions of how to do this or any tutorials?

                  如果有帮助,我正在使用 Drupal 7.

                  If it helps, I'm using Drupal 7.

                  附带说明一下,如果在 Drupal 中无法做到这一点,或者即使可以做到,在 PHP 中创建它然后以某种方式将其包装在 Drupal 中会更好吗?我正在辩论这个,因为我想我知道如何在 PHP 中做到这一点,它可能让我对结果有更多的控制(但我有点懒,因为我想也许 Drupal 可以为我做这件事 :-)

                  On a side note, if it's not possible to do this in Drupal or even if it is, would it be better to create this in PHP and then somehow wrap it in Drupal? I'm debating this because I think I know how to do this in PHP and it might give me more control on the result (but i'm being a bit lazy because I'm thinking maybe Drupal can do it for me :-)

                  更新:好的,现在我更困惑了.我已经查看了视图,但仍然无法将其与我的数据库集成.我已经查看了模式和提要作为描述数据库或让它与 Drupal 复制的一种方式.我不确定我是否朝着正确的方向(或正确的方向是什么),因为到目前为止我正在尝试的一切似乎都是死胡同.有人可以推荐一个教程吗?或者讲述他们完成这项工作的经验?我只是想将另一个数据库中的内容显示到页面上(当用户选择特定的股票行情时),我可能希望允许用户稍后对其进行自定义(这就是我认为需要视图的原因).

                  Update: Okay, now I'm even more confused. I have looked into views and still can't get it to integrate with my database. I have looked at schemas, and feeds as a way of either describing the database or getting it to replicate with Drupal. I'm not sure if I'm going the right direction (or what the right direction is) because so far everything I am trying seems to be a dead end. Can someone suggest a tutorial? Or relate their experiences getting this done? I simply want to display content from another database onto a page (when users select a specific stock ticker), I may want to allow users to customize it later(which is why I think views are needed).

                  推荐答案

                  至于连接数据库,在 settings.php 中你可以添加额外的数据库连接,并在代码中使用 db_set_active('connection_name') 函数来切换你的到该源的活动数据库连接.为视图构建插件 - 这是一个远远超出单一答案范围的大主题.我只能说是谷歌它并祝你好运,然后回来提供细节:)

                  As far as connecting to the database, in settings.php you can add additional database connections and use the db_set_active('connection_name') function in code to switch your active db connection to that source. Building plugins for views - that's a big subject far beyond the scope of a single answer. All I can say is Google it and good luck, and come back with specifics :)

                  这篇关于如何使用 Drupal 发布驻留在外部数据库中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:是否可以使用 Drupal api 来获取用户列表? 下一篇:在开发、登台和生产之间同步 Drupal 站点

                  相关文章

                  <small id='Mj2Tn'></small><noframes id='Mj2Tn'>

                    <bdo id='Mj2Tn'></bdo><ul id='Mj2Tn'></ul>

                  <i id='Mj2Tn'><tr id='Mj2Tn'><dt id='Mj2Tn'><q id='Mj2Tn'><span id='Mj2Tn'><b id='Mj2Tn'><form id='Mj2Tn'><ins id='Mj2Tn'></ins><ul id='Mj2Tn'></ul><sub id='Mj2Tn'></sub></form><legend id='Mj2Tn'></legend><bdo id='Mj2Tn'><pre id='Mj2Tn'><center id='Mj2Tn'></center></pre></bdo></b><th id='Mj2Tn'></th></span></q></dt></tr></i><div id='Mj2Tn'><tfoot id='Mj2Tn'></tfoot><dl id='Mj2Tn'><fieldset id='Mj2Tn'></fieldset></dl></div>
                  <legend id='Mj2Tn'><style id='Mj2Tn'><dir id='Mj2Tn'><q id='Mj2Tn'></q></dir></style></legend>

                    <tfoot id='Mj2Tn'></tfoot>