【问题标题】:Pulling data from an SQL database server using CodeIgniter使用 CodeIgniter 从 SQL 数据库服务器中提取数据
【发布时间】:2015-03-09 15:01:13
【问题描述】:

我正在使用 CodeIgniter 从 SQL Server 数据库中提取数据。我的连接很好,但问题是我只能查询一次数据库!

例如,我的网络界面上有两个链接。一个提取显示学生详细信息的数据,另一个应该提取大学提供的课程。当我点击链接拉取学生详细信息时,另一个链接不起作用;它什么也不显示!两个链接都已使用有效代码进行编码,并且一次只能使用那个链接。

我该怎么做?

【问题讨论】:

  • 你应该提供更多细节,显示代码。
  • 如果先点击第二个链接会怎样?你如何建立链接?你使用相对路径还是 base_url()?多说一点
  • 复制编辑(例如 ref. en.wiktionary.org/wiki/won%27t>, )

标签: php sql-server codeigniter


【解决方案1】:
Thanx i finaly got it right! I just forgot to put 'echo' behind the generate 
statement hence when i clicked that link it could'nt               
draw any table on the interface.

**WRONG ONE.**
    <?php
     $this->table->generate($getAddresses_contents);
     ?>   

**CORRECT ONE.**
 <?php
  echo $this->table->generate($getAddresses_contents);
  ?>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 2018-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多